Commit 5395531a authored by git's avatar git Committed by nikunj
Browse files

Issue #2731231 by arled: Problem with fapi regex validation with special characters

parent 9ad1bada
......@@ -192,10 +192,10 @@ function clientside_validation_menu() {
function _clientside_validation_ajax_call() {
$param = $_POST['param'];
$value = check_plain($_POST['value']);
$value = (string) $_POST['value'];
$result = array();
foreach ($param['expressions'] as $key => $regex) {
if (!(bool) preg_match($regex, (string) $value)) {
if (!(bool) preg_match($regex, $value)) {
$result = array('result' => FALSE, 'message' => $param['messages'][$key]);
break;
}
......
Markdown is supported
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