mastani / nova-password-reset

Reset your nova password easily from top navigation
9 stars 12 forks source link

Allowing to pass in a custom rule #3

Open tiagoraposeiraff opened 3 years ago

tiagoraposeiraff commented 3 years ago

This PR adds a new config value called custom_password_rule. The idea is that anyone can pass in their own validation (or any of the existing ones from Laravel). Also, I removed the validation duplication on the password confirmation that would causes duplicated error messages when using custom validations - it only needs to check if it matches the password.

For example, in my current project we have many custom rules defined in AppServiceProvider and this way we can just grab our existing password validation.