How to validate a non required filed that should not contain the following special characters #<`>
and a white space before dot(.) I have Regex \`|\#|\&|\<|\ \.|\>
to validate above condition but don't have any idea how to this regex with the yup.matches(). Thanks in advance
Regex: \`|\#|\&|\<|\ \.|\>
my validation schema is:
const validationSchema = function (values) {
var regx = new RegExp(/\`|\#|\&|\<|\ \.|\>/gms);
return Yup.object().shape({
about: Yup.string()
.matches(expression, 'about should not contain ` # < > \n')
})
}