1.9.0
You can now validate your codice fiscale against other form fields to check whether there is a match
or not.
You must specify all of the required fields:
first_name
last_name
birthdate
place
gender
giving parameters to the codice_fiscale
rule.
For example:
public function rules()
{
return [
'codicefiscale' => 'codice_fiscale:first_name=first_name_field,last_name=last_name_field,birthdate=birthdate_field,place=place_field,gender=gender_field',
'first_name_field' => 'required|string',
'last_name_field' => 'required|string',
'birthdate_field' => 'required|date',
'place_field' => 'required|string',
'gender_field' => 'required|string|max:1',
];
}
Validation fails if the provided codicefiscale and the one generated from the input fields do not match.