@comicrelief/storybook 2.4.0 → 2.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -116,7 +116,8 @@ export default {
|
|
|
116
116
|
label: 'Phone number',
|
|
117
117
|
placeholder: null,
|
|
118
118
|
required: true,
|
|
119
|
-
|
|
119
|
+
// For reference for the future usage, but also because I had to do some weird formatting with the escape characters, don't wanna lose it!
|
|
120
|
+
// pattern: '^(((((\\+44)|(0044))\\s?\\d{4}|\\(?0\\d{4}\\)?)\\s?\\d{3}\\s?\\d{3})|((((\\+44)|(0044))\\s?\\d{3}|\\(?0\\d{3}\\)?)\\s?\\d{3}\\s?\\d{4})|((((\\+44)|(0044))\\s?\\d{2}|\\(?0\\d{2}\\)?)\\s?\\d{4}\\s?\\d{4}))(\\s?\\\\#(\\d{4}|\\d{3}))?$',
|
|
120
121
|
},
|
|
121
122
|
],
|
|
122
123
|
},
|
|
@@ -142,7 +143,7 @@ export default {
|
|
|
142
143
|
label: 'Mobile number',
|
|
143
144
|
placeholder: null,
|
|
144
145
|
required: true,
|
|
145
|
-
pattern: '^(((((\\+44)|(0044))\\s?\\d{4}|\\(?0\\d{4}\\)?)\\s?\\d{3}\\s?\\d{3})|((((\\+44)|(0044))\\s?\\d{3}|\\(?0\\d{3}\\)?)\\s?\\d{3}\\s?\\d{4})|((((\\+44)|(0044))\\s?\\d{2}|\\(?0\\d{2}\\)?)\\s?\\d{4}\\s?\\d{4}))(\\s?\\\\#(\\d{4}|\\d{3}))?$',
|
|
146
|
+
// pattern: '^(((((\\+44)|(0044))\\s?\\d{4}|\\(?0\\d{4}\\)?)\\s?\\d{3}\\s?\\d{3})|((((\\+44)|(0044))\\s?\\d{3}|\\(?0\\d{3}\\)?)\\s?\\d{3}\\s?\\d{4})|((((\\+44)|(0044))\\s?\\d{2}|\\(?0\\d{2}\\)?)\\s?\\d{4}\\s?\\d{4}))(\\s?\\\\#(\\d{4}|\\d{3}))?$',
|
|
146
147
|
},
|
|
147
148
|
],
|
|
148
149
|
},
|
|
@@ -222,8 +222,8 @@ class MarketingConsentCheckbox extends Component {
|
|
|
222
222
|
showErrorMessage={this.props.showErrorMessages}
|
|
223
223
|
fieldValue={this.state.checkboxValidation[checkbox].fieldValidation[field.name]}
|
|
224
224
|
value={() => this.fieldValue(checkbox, field.name)}
|
|
225
|
-
// Only use our improved Yup-based validation for
|
|
226
|
-
yupValidation={field.type === 'email'}
|
|
225
|
+
// Only use our improved Yup-based validation for the problematic fields
|
|
226
|
+
yupValidation={field.type === 'email' || field.type === 'tel'}
|
|
227
227
|
/>
|
|
228
228
|
</div>
|
|
229
229
|
))
|