Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Open sidebar
drupal.org
clientside_validation
Commits
5395531a
Commit
5395531a
authored
Oct 02, 2019
by
git
Committed by
nikunj
Oct 02, 2019
Browse files
Issue #2731231 by arled: Problem with fapi regex validation with special characters
parent
9ad1bada
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
clientside_validation.module
clientside_validation.module
+2
-2
No files found.
clientside_validation.module
View file @
5395531a
...
...
@@ -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
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment