Skip to content

Instantly share code, notes, and snippets.

@Allisone
Created March 15, 2012 09:43
Show Gist options
  • Save Allisone/2043300 to your computer and use it in GitHub Desktop.
Save Allisone/2043300 to your computer and use it in GitHub Desktop.
What works and what doesn't
/**
* save the registration
* @param string $email email
* @param string $pw password
* @param string $uname username
* @FLOW3\Validate(argumentName="email", type="EmailAddress")
* @FLOW3\Validate(argumentName="email", type="NotEmpty")
* @FLOW3\Validate(argumentName="pw", type="Me\My\Validation\Validator\PasswordValidator", options={ "minimum"=1, "maximum"=255 })
*/
public function createAction($email = '', $pw = '', $uname = '') {...}
// ===> options empty
/**
* save the registration
* @param string $email email
* @param string $pw password
* @param string $uname username
* @FLOW3\Validate(argumentName="email", type="EmailAddress")
* @FLOW3\Validate(argumentName="email", type="NotEmpty")
* @FLOW3\Validate(argumentName="pw", type="StringLength", options={ "minimum"=1, "maximum"=255 })
*/
public function createAction($email = '', $pw = '', $uname = '') {...}
// ===> options set
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment