This topic is: not resolved
- This topic has 1 reply, 2 voices, and was last updated 9 years, 3 months ago by .
Viewing 2 posts - 1 through 2 (of 2 total)
Viewing 2 posts - 1 through 2 (of 2 total)
- You must be logged in to reply to this topic.
Home › Forums › Quform PHP › Email validation not working
Hello!
I have multilingual site and I changed this piece of code in process.php:
$email->addValidators(array('required', 'email'));
with this:
switch ($lang) {
case "ru" : $required_fields_lang = "Обязательно к заполнению"; break;
case "en" : $required_fields_lang = "This field is required"; break;
case "es" : $required_fields_lang = "Campo requerido"; break;
case "fi" : $required_fields_lang = "Pakolliset kentät"; break;
case "fr" : $required_fields_lang = "Champs obligatoires"; break;
case "de" : $required_fields_lang = "Pflichtfelder"; break;
case "no" : $required_fields_lang = "Obligatoriske felt"; break;
case "pl" : $required_fields_lang = "Pola wymagane"; break;
case "sv" : $required_fields_lang = "Obligatoriska fält";
}
...
$email->addValidator('required', array(
'messages' => array('required' => $required_fields_lang)
));
Now when I leave email field empty I just get message in $required_fields_lang but there is no validation for email field (<some_text>@<domain_name>.<domain_zone>).
How should I change $email->addValidator() to get email validation works. Thank You!
P.s. Sorry for my weak English.
You don't have permission to view this content. Please log in or register and then verify your purchases to gain access.