I am designing a user registration screen using FluentValidation.
I want to establish a control mechanism that will provide information on all steps as follows.
The code I tried;
RuleFor(p => p.Password).Matches(@"[A-Z]+").WithMessage("Your password must contain at least one uppercase letter.");
RuleFor(p => p.Password).Matches(@"[a-z]+").WithMessage("Your password must contain at least one lowercase letter.");
RuleFor(p => p.Password).Matches(@"[0-9]+").WithMessage("Your password must contain at least one number.");
RuleFor(x => x.Password).Matches(@"[\!\?\*\.]*$").WithMessage("Your password must contain at least one (!? *.).");
But I could not reach the result I wanted. I also looked at the FluentValidation documentation but could not see any useful example.
I would be glad if you help.
Thank you.
