Hi
I want to customize the field validation rules for email and message as follows:
1- email should not contain more than 3 dots
2 - text area field should not contain any hyperlink
I know it is possible using php code but I'm not a programmer
I want to customize the field validation rules for email and message as follows:
1- email should not contain more than 3 dots
2 - text area field should not contain any hyperlink
I know it is possible using php code but I'm not a programmer
Hi
What are 3 dots? (Sorry, I'm french). 3 characters?
For the second point, it's very easy. You have to control that field doesn't contain @.
What are 3 dots? (Sorry, I'm french). 3 characters?
For the second point, it's very easy. You have to control that field doesn't contain @.
Hi
dots are "."
How I can control if the field doesn't contain @...do you have an example?
dots are "."
How I can control if the field doesn't contain @...do you have an example?
You set a variable $address with field email address:
Then you test this variable, something like...
$address=$this->get("field_address", "");
Then you test this variable, something like...
if (strpos($address, '@') !== false) {// The word WAS found}
You need to login to be able to post a reply.