-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Open
Description
- [ X ] I have looked at the documentation here first?
- [ X ] I have looked at the examples provided that may showcase my question here?
Package version:
v10
Enhancement:
Current implementation does not allow to augment predefined validators.
Let's say someone define a custom type and want to add support for isEq
, isNe
, etc., If he/she calls RegisterValidation
, the existing validator will be overriden completely and existing functionality for them must be written again.
Proposal.
To avoid the library to keep a chain of validators and break compatibility adding a new return value that indicates if the callback handled the validator or the library must call the next one in the chain, I simply propose adding a GetRegisterValidation
routine so the developer can manage chaining.
If the idea is accepted, I can create a PR.
Regards,
Mauro.
Metadata
Metadata
Assignees
Labels
No labels