-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
editor: add min/max keys validator on object #409
Conversation
4a374b6
to
0388f32
Compare
return k1.filter(k => a[k] === b[k]); | ||
} | ||
const min = customValidators.numberOfSpecificValuesInObject.min || 0; | ||
const max = customValidators.numberOfSpecificValuesInObject.max || Infinity; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I learned something --> Infinity
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Commit message title suggestion: editor: add min/max keys validator on object
It would be great to have an example in the demo tester. |
0388f32
to
618de04
Compare
Allow to validate an array of object based on minimum or/and maximum key/value pairs. Ex: for a document, allow to specify that a document must have strictly one main title. Closes rero/rero-ils#1361. Co-Authored-by: Renaud Michotte <renaud.michotte@gmail.com>
618de04
to
24749f2
Compare
Allow to validate an array of object based on minimum or/and maximum
key/value pairs. Ex: for a document, allow to specify that a document
must have strictly one main title.
Closes rero/rero-ils#1361.
Co-Authored-by: Renaud Michotte renaud.michotte@gmail.com
Why are you opening this PR?
How to test?
Code review check list