Commit f54ee484 authored by Penny Leach's avatar Penny Leach
Browse files

PIEFORMS: make email address validation not case sensitive

parent 5b12f475
......@@ -37,7 +37,7 @@
* the address.
*/
function pieform_rule_email(Pieform $form, $value, $element) {
if (!preg_match('/^[a-z0-9\._%-]+@(?:[a-z0-9-]+\.)+[a-z]{2,4}$/', $value)) {
if (!preg_match('/^[A-Za-z0-9\._%-]+@(?:[A-Za-z0-9-]+\.)+[a-z]{2,4}$/', $value)) {
return $form->i18n('rule', 'email', 'email', $element);
}
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment