Come aggiungere la regola di convalida della password nel validatore? regolaRegola di convalida della password di Laravel
convalida:
La password contiene caratteri appartenenti ad almeno tre delle seguenti cinque categorie:
- caratteri inglese maiuscoli (A - Z)
- caratteri minuscoli dell'alfabeto inglese (a - z)
- Base 10 cifre (0 - 9)
- Non alfanumerico (ad esempio:!, $, # o%)
- caratteri Unicode
Come aggiungere sopra regola nella regola di convalida?
My Code Qui
// create the validation rules ------------------------
$rules = array(
'name' => 'required', // just a normal required validation
'email' => 'required|email|unique:ducks', // required and must be unique in the ducks table
'password' => 'required',
'password_confirm' => 'required|same:password' // required and has to match the password field
);
// do the validation ----------------------------------
// validate against the inputs from our form
$validator = Validator::make(Input::all(), $rules);
// check if the validator failed -----------------------
if ($validator->fails()) {
// get the error messages from the validator
$messages = $validator->messages();
// redirect our user back to the form with the errors from the validator
return Redirect::to('home')
->withErrors($validator);
}
Non è possibile rappresentare ogni carattere come * carattere unicode *? –