trying to check a sentence contains special character | or ] using Laravel/Lumen validation in the controller like as below
'to_address' => 'required|max:200|regex:/^[^(|]~`!%^&*=};:?><’)]*$/',
if I user this validation on my controller, I'm getting the following error
{
"error": "preg_match(): No ending delimiter '/' found"
}
without | and ] the validation is working correctly.
from Newest questions tagged laravel-5 - Stack Overflow https://ift.tt/2qOG0o2
via IFTTT
Aucun commentaire:
Enregistrer un commentaire