diff --git a/docs/validation.md b/docs/validation.md index 669ba7de..9b5b77ce 100755 --- a/docs/validation.md +++ b/docs/validation.md @@ -6,7 +6,7 @@ `- {label: "Subtitle", name: "subtitle", widget: "string", required: false}` - Pattern: Field configuration can specify a regex pattern with the appropriate error message. Example: -`- {label: "Title", name: "title", widget: "string", pattern: [".{10,}", "Should have more than 10 characters"] }` +`- {label: "Title", name: "title", widget: "string", pattern: ['.{10,}', "Should have more than 10 characters"] }` ## Advanced Guide (For widget authors) @@ -51,4 +51,4 @@ You can also return a promise from `isValid`. While the promise is pending, the }; ``` -Note: Do not create a promise inside `isValid` - `isValid` is called right before trying to persist. This means that even if a previous promise was already resolved, when the user hits 'save', `isValid` will be called again. If it returns a new promise, it will be immediately marked as "in error" until the new promise resolves. \ No newline at end of file +Note: Do not create a promise inside `isValid` - `isValid` is called right before trying to persist. This means that even if a previous promise was already resolved, when the user hits 'save', `isValid` will be called again. If it returns a new promise, it will be immediately marked as "in error" until the new promise resolves.