name: {
type: "string",
minLength: 1,
maxLength: 15,
pattern: "^[^\\s].+[^\\s]$", // blocks leading and trailing white spaces
errorMessage: "name",
},
The above is the ajv schema for the name
property. How do I further specify that certain values are not allowed. For example, "Hitler" and "Khan" are not allowed.
Comments
Post a Comment