I've created my own PasswordValidator
and add it to the IdentityBuilder by using services.AddIdentity<, >().AddPasswordValidator<>()
.
This adds my PasswordValidator on top of the default one, so the password will be checked by both. (not what I need).
How can I remove the default one?
AddIdentity
only adds the defaultPasswordValidator
implementation if one hasn't already been registered. Because of this, you can add your custom implementation before callingAddIdentity
:In this case, only
YourPasswordValidator
gets registered.