You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
zsh-5.8$ concerto validate --model test.cto --input person.json
7:56:56 AM - INFO: Input is invalid
7:56:56 AM - ERROR: Validator error for field undefined org.test.Person.name: Value + 'John' failed to match validation regex: /^[a-zA-Z][a-zA-Z0-9]*$\//
Error: Validator error for field undefined org.test.Person.name: Value + 'John' failed to match validation regex: /^[a-zA-Z][a-zA-Z0-9]*$\//
at StringValidator.reportError (/usr/local/lib/node_modules/@accordproject/concerto-cli/node_modules/@accordproject/concerto-core/lib/introspect/validator.js:44:15)
at StringValidator.validate (/usr/local/lib/node_modules/@accordproject/concerto-cli/node_modules/@accordproject/concerto-core/lib/introspect/stringvalidator.js:56:22)
at ResourceValidator.checkItem (/usr/local/lib/node_modules/@accordproject/concerto-cli/node_modules/@accordproject/concerto-core/lib/serializer/resourcevalidator.js:327:42)
at ResourceValidator.visitField (/usr/local/lib/node_modules/@accordproject/concerto-cli/node_modules/@accordproject/concerto-core/lib/serializer/resourcevalidator.js:221:22)
at ResourceValidator.visit (/usr/local/lib/node_modules/@accordproject/concerto-cli/node_modules/@accordproject/concerto-core/lib/serializer/resourcevalidator.js:77:25)
at Field.accept (/usr/local/lib/node_modules/@accordproject/concerto-cli/node_modules/@accordproject/concerto-core/lib/introspect/decorated.js:65:24)
at ResourceValidator.visitClassDeclaration (/usr/local/lib/node_modules/@accordproject/concerto-cli/node_modules/@accordproject/concerto-core/lib/serializer/resourcevalidator.js:174:26)
at ResourceValidator.visit (/usr/local/lib/node_modules/@accordproject/concerto-cli/node_modules/@accordproject/concerto-core/lib/serializer/resourcevalidator.js:73:25)
at ConceptDeclaration.accept (/usr/local/lib/node_modules/@accordproject/concerto-cli/node_modules/@accordproject/concerto-core/lib/introspect/decorated.js:65:24)
at ValidatedResource.validate (/usr/local/lib/node_modules/@accordproject/concerto-cli/node_modules/@accordproject/concerto-core/lib/model/validatedresource.js:125:26)
The text was updated successfully, but these errors were encountered:
Bug Report 🐛
Regular expressions with flags e.g.,
/^[a-zA-Z0-1]*^/u
do not work.Expected Behavior
Regular expressions should work with flags.
Current Behavior
With the given CTO:
And input data:
The validation fails:
The text was updated successfully, but these errors were encountered: