Hello. thank you for this awesomeness. just a question. How would you check a string with the said conditions? Contains() cant accept an array of strings. Should I create a custom validator for this?
Use case:
Check a password before saving it in the database.
Thank you sir!
Hi,
you can add several @Contains, but because your task sounds more like regexp I would suggest to use @Matches.
@Matches(/[0-9]/)
@Matches(/[!@#$%^&]/)
@Matches(/[A-Z]/)
public password: string;
@satanTime thank you man. I didnt that on the documentation last night. Maybe was just tired. thanks again. will close this now.
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Most helpful comment
Hi,
you can add several
@Contains, but because your task sounds more like regexp I would suggest to use@Matches.