Closed prashant-saxena closed 4 years ago
Hi,
I have a rule defined like this:
'tags': ['required','between:3,100','regex:/^[a-z0-9, ]+$/'],
The problem is because of comma ',' character. In validateMatch function, where let re = params[0]
let re = params[0]
line is there, actual param value is Array [ "/^[a-z0-9", " ]+$/" ]
Array [ "/^[a-z0-9", " ]+$/" ]
and you are using param[0], that's why it's throwing
unterminated character class
error.
This will not be fixed. You are free to open a PR anyway.
Hi,
I have a rule defined like this:
'tags': ['required','between:3,100','regex:/^[a-z0-9, ]+$/'],
The problem is because of comma ',' character. In validateMatch function, where
let re = params[0]
line is there, actual param value is
Array [ "/^[a-z0-9", " ]+$/" ]
and you are using param[0], that's why it's throwing
error.