Custom attribute replacements for custom rules
See original GitHub issueIt would be nice to have custom replacements for a custom rule using the Validator.register()
function.
Ex.:
Validator.register(
'dateBetween',
function (value, requirement) {
// custom validation using dates
},
function (parameters) {
return {
min: parameters[0],
max: parameters[1],
});
},
'Custom message for attribute :attribute with replacements :min and :max.',
);
Issue Analytics
- State:
- Created 7 years ago
- Reactions:11
- Comments:10 (3 by maintainers)
Top Results From Across the Web
Example of Defining Set Attribute Value Rules for Custom ...
This topic explains how to define a survivorship rule of the type Set Attribute Value to select the smallest value for a specific...
Read more >Custom rule attributes
A custom rule attribute represents a specific piece of information that you can attach to a rule that doesn't fit into existing rule...
Read more >Custom attributes in Exchange Server
Summary: Learn to use the custom attributes in Exchange Server 2016 or Exchange Server 2019 to add information about a mail recipient.
Read more >Using Business Rules to update custom attributes
Business Rules make it easier than ever to update a custom attribute based upon a trigger, like a keyword on an incoming email....
Read more >How to set up office 365 custom attributes & use them in ...
How to set up custom attributes in Office 365 · Log in to your Office 365 tenant and click the Admin app. ·...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
This feature was added in
v3.19
https://github.com/anwr-group/validatorjs/blob/master/spec/register.js In this fork you can add custom replacements.