You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In version 3.22.1, when using the provided example for creating custom attributes the :min and :max parameters are not returned.
In doing a little investigation version 3.22.1 seems to be missing some code from PR #375 that implemented the feature. When adding back the missing code the provided example works as expected.
Not sure if it was intended and if there is a different way the custom replacements need to be implemented in this version. A little guidance would be helpful thank you in advance!
Provided Example from Docs
Validator.register(
'date_between',
function (value, requirement) {
// custom validation using dates
},
'Custom message for attribute :attribute with replacements :min and :max.',
function (_template, rule, _getAttributeName) {
const parameters = rule.getParameters();
return {
min: parameters[0],
max: parameters[1],
};
}
);
The text was updated successfully, but these errors were encountered:
In version 3.22.1, when using the provided example for creating custom attributes the
:min
and:max
parameters are not returned.In doing a little investigation version 3.22.1 seems to be missing some code from PR #375 that implemented the feature. When adding back the missing code the provided example works as expected.
Not sure if it was intended and if there is a different way the custom replacements need to be implemented in this version. A little guidance would be helpful thank you in advance!
Provided Example from Docs
The text was updated successfully, but these errors were encountered: