Jsonschema Title Pattern

Viewed 62

How to validate jsonschema with a titled pattern, e.g. words start with uppercase characters, all remaining cased characters have lowercase.

My attempt so far does almost work, only there is a required space on the tail:

^([A-Z][a-z]+ )+$
2 Answers

Try it with removing the last space.

^([A-Z][a-z]+)+$

EDIT

If you need the space between each word, this should work.

^([A-Z][a-z]+ )+[A-Z][a-z]+$

not super elegant:

^(([A-Z][a-z]* )*[A-Z][a-z])+$
Related