asp.net - Regex password validation working fine on regex verification sites but not on mine -


i have following regex code works fine on regex verification code not on website (built asp.net mvc). validates length , numeric not absence of special characters.

my regex: /^(?=.*[!@@#$&](?=.*[a-z]))(?=.*[0-9])(?=.*[a-z]).{8,}$/

on website toto1234 considered fine not case since not contain special character.

basically checking on view did not make change on model. model had regex not checking special characters. on view, there script checks if password matches regex.

edit: solution, more clear make sure view model or class decorated right regex. regex check and/or validation in view work temporary before try submit form.

in case since had different regex (in view --via jquery-- , model), client side verification worked because have right regex. server side verification did not. had make sure had right regex on class well.

hope more clear.


Comments

Popular posts from this blog

jOOQ update returning clause with Oracle -

java - Warning equals/hashCode on @Data annotation lombok with inheritance -

java - BasicPathUsageException: Cannot join to attribute of basic type -