How to write custom password validation for user entity ?