HS88
HS88

Reputation: 11

Laravel regex validation prevent special charcters

I want to prevent these characters /:?“<>| inside string by Laravel validation how I can do this?

Upvotes: 1

Views: 558

Answers (1)

tung7ran
tung7ran

Reputation: 9

You can use regex/ not_regex patterns. For example:

'email' => 'not_regex:/^.+$/i'

Upvotes: 1

Related Questions