|
@@ -458,7 +458,7 @@ function Register2($verifiedOpenID = false)
|
|
$custom_field_errors[] = array('custom_field_invalid_email', array($row['field_name']));
|
|
$custom_field_errors[] = array('custom_field_invalid_email', array($row['field_name']));
|
|
elseif ($row['mask'] == 'number' && preg_match('~[^\d]~', $value))
|
|
elseif ($row['mask'] == 'number' && preg_match('~[^\d]~', $value))
|
|
$custom_field_errors[] = array('custom_field_not_number', array($row['field_name']));
|
|
$custom_field_errors[] = array('custom_field_not_number', array($row['field_name']));
|
|
- elseif (substr($row['mask'], 0, 5) == 'regex' && preg_match(substr($row['mask'], 5), $value) === 0)
|
|
+ elseif (substr($row['mask'], 0, 5) == 'regex' && trim($value) != '' && preg_match(substr($row['mask'], 5), $value) === 0)
|
|
$custom_field_errors[] = array('custom_field_inproper_format', array($row['field_name']));
|
|
$custom_field_errors[] = array('custom_field_inproper_format', array($row['field_name']));
|
|
}
|
|
}
|
|
}
|
|
}
|