phpvalidationlaravel

How to allow special characters for a password in Laravel?


By default Laravel's validator has alpha, apha_num, apha_dash. All three of which can't check for special characters, so if I set any of them for the password field, it always gives me an error if the password has a special character. Does anybody know how to allow special characters in validation?


Solution

  • I would suggest just not using anything there except required and maybe a min length (min:6 iirc). That way the user can enter whatever they like, numbers, letters or special characters...

    My question would be what are you trying to prevent?