Commit 142ec0a5 authored by peterhegman's avatar peterhegman

Move error message props into `defaultProps`

parent 5e9afab4
...@@ -12,6 +12,8 @@ describe('CommaSeparatedListTokenSelector', () => { ...@@ -12,6 +12,8 @@ describe('CommaSeparatedListTokenSelector', () => {
const defaultProps = { const defaultProps = {
hiddenInputId: 'comma-separated-list', hiddenInputId: 'comma-separated-list',
ariaLabelledby: 'comma-separated-list-label', ariaLabelledby: 'comma-separated-list-label',
errorMessage: 'The value entered is invalid',
disallowedValueErrorMessage: 'The value entered is not allowed',
}; };
const createComponent = options => { const createComponent = options => {
...@@ -147,7 +149,6 @@ describe('CommaSeparatedListTokenSelector', () => { ...@@ -147,7 +149,6 @@ describe('CommaSeparatedListTokenSelector', () => {
createComponent({ createComponent({
propsData: { propsData: {
regexValidator: /baz/, regexValidator: /baz/,
errorMessage: 'The value entered is invalid',
}, },
}); });
...@@ -164,7 +165,6 @@ describe('CommaSeparatedListTokenSelector', () => { ...@@ -164,7 +165,6 @@ describe('CommaSeparatedListTokenSelector', () => {
createComponent({ createComponent({
propsData: { propsData: {
disallowedValues: ['foo', 'bar', 'baz'], disallowedValues: ['foo', 'bar', 'baz'],
disallowedValueErrorMessage: 'The value entered is not allowed',
}, },
}); });
...@@ -181,9 +181,7 @@ describe('CommaSeparatedListTokenSelector', () => { ...@@ -181,9 +181,7 @@ describe('CommaSeparatedListTokenSelector', () => {
createComponent({ createComponent({
propsData: { propsData: {
regexValidator: /baz/, regexValidator: /baz/,
errorMessage: 'The value entered is invalid',
disallowedValues: ['foo', 'bar', 'baz'], disallowedValues: ['foo', 'bar', 'baz'],
disallowedValueErrorMessage: 'The value entered is not allowed',
}, },
}); });
...@@ -198,9 +196,7 @@ describe('CommaSeparatedListTokenSelector', () => { ...@@ -198,9 +196,7 @@ describe('CommaSeparatedListTokenSelector', () => {
createComponent({ createComponent({
propsData: { propsData: {
regexValidator: /foo/, regexValidator: /foo/,
errorMessage: 'The value entered is invalid',
disallowedValues: ['foo', 'bar', 'baz'], disallowedValues: ['foo', 'bar', 'baz'],
disallowedValueErrorMessage: 'The value entered is not allowed',
}, },
}); });
...@@ -218,9 +214,7 @@ describe('CommaSeparatedListTokenSelector', () => { ...@@ -218,9 +214,7 @@ describe('CommaSeparatedListTokenSelector', () => {
createComponent({ createComponent({
propsData: { propsData: {
regexValidator: /foo/, regexValidator: /foo/,
errorMessage: 'The value entered is invalid',
disallowedValues: ['bar', 'baz'], disallowedValues: ['bar', 'baz'],
disallowedValueErrorMessage: 'The value entered is not allowed',
}, },
scopedSlots: { scopedSlots: {
'user-defined-token-content': '<span>Add "{{props.inputText}}"</span>', 'user-defined-token-content': '<span>Add "{{props.inputText}}"</span>',
...@@ -262,7 +256,6 @@ describe('CommaSeparatedListTokenSelector', () => { ...@@ -262,7 +256,6 @@ describe('CommaSeparatedListTokenSelector', () => {
createComponent({ createComponent({
propsData: { propsData: {
regexValidator: /baz/, regexValidator: /baz/,
errorMessage: 'The value entered is invalid',
}, },
}); });
...@@ -285,7 +278,6 @@ describe('CommaSeparatedListTokenSelector', () => { ...@@ -285,7 +278,6 @@ describe('CommaSeparatedListTokenSelector', () => {
createComponent({ createComponent({
propsData: { propsData: {
regexValidator: /baz/, regexValidator: /baz/,
errorMessage: 'The value entered is invalid',
}, },
}); });
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment