Skip to content

Instantly share code, notes, and snippets.

@JoaoVagner
Last active December 25, 2015 22:39
Show Gist options
  • Save JoaoVagner/7050942 to your computer and use it in GitHub Desktop.
Save JoaoVagner/7050942 to your computer and use it in GitHub Desktop.
Validation match_field comparasion password
<?php public function registerStepOne($params) {
$userCollection = \Mongaconnector::collection($this->collection);
$registerValidation = \Validation::forge('registerStepOne');
$registerValidation->add_callable(new \validationRegister());
$registerValidation->add_field('username', 'Your username', 'required');
$registerValidation->add_field('password', 'Your password', 'required|min_length[3]|max_length[10]');
$registerValidation->add_field('confirm_password', 'Confirm Yor Password', 'match_field[password]');
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment