[AAE-10729] form empty string regex validation unit test (#7870)

* [AAE-10729] empty string regex validation

* trigger travis
This commit is contained in:
Rafal Szmit
2022-10-03 11:57:21 +02:00
committed by GitHub
parent 39a178f653
commit 797a425f7f

View File

@@ -581,6 +581,16 @@ describe('FormFieldValidator', () => {
expect(validator.validate(field)).toBeTruthy();
});
it('should allow empty string values', () => {
const field = new FormFieldModel(new FormModel(), {
type: FormFieldTypes.TEXT,
value: '',
regexPattern: 'pattern'
});
expect(validator.validate(field)).toBeTruthy();
});
it('should succeed validating regex', () => {
const field = new FormFieldModel(new FormModel(), {
type: FormFieldTypes.TEXT,