fix(core): list widget pattern validation (#2599)

* fix list widget pattern validation

* remove array value check
This commit is contained in:
Bartholomew 2019-09-05 20:06:56 +01:00 committed by Shawn Erquhart
parent 15a2da0d6d
commit 6765bbd2fd

View File

@ -132,6 +132,9 @@ export default class Widget extends Component {
return { error: false };
}
// Convert list input widget value to string for pattern test
List.isList(value) && (value = value.join(','));
if (pattern && !RegExp(pattern.first()).test(value)) {
const error = {
type: ValidationErrorTypes.PATTERN,