I am Designing a RAML and in that RAML I need to validate a field that it should be an email ?
I built a regex already but not sure what property i should use in RAML to use regex validation.
2 answers
Anurag Sharma (Nagarro) Forum Ambassador
Hello,
to use regex in RAML you have to use a poperty - "pattern". Look at the below example
fieldName:
displayName: fieldName
type: string
pattern: ^[a-zA-Z0-9]*$
here filedName is type of String with a validation (alphanumeric) using regex. same way you can give regex for email.