Skip to content

Instantly share code, notes, and snippets.

@nsanden
Created January 10, 2015 17:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nsanden/381ce01136acea831b4f to your computer and use it in GitHub Desktop.
Save nsanden/381ce01136acea831b4f to your computer and use it in GitHub Desktop.
public function rules()
{
return [
['username', 'required'],
['username', 'unique', 'message' => 'This username has already been taken.'],
['username', 'string', 'min' => 2, 'max' => 255],
['email', 'required'],
['email', 'email'],
['email', 'unique', 'message' => 'This email address has already been taken.'],
['password', 'string', 'min' => 6],
['fname', 'required'],
];
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment