js-validator-livr
js-validator-livr copied to clipboard
not_one_of string rule
Thank you for the request. We want to leave this repo compatible with the spec. Extra rules (not covered by the spec) will be placed to another repo. It will be published soon
@one-more Could you describe the real use case for this rule? When we need it?
for example when we adding item to the list and want it to be unique.
const userRoles = ['administrator', 'user', 'conntent manager'];
const schema = {
roleName: ['required', 'not_empty', {not_one_of: userRoles}]
}