We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2b29174 commit 7f7884bCopy full SHA for 7f7884b
packages/react-form-renderer/src/tests/validators/validators.test.js
@@ -28,6 +28,14 @@ describe('New validators', () => {
28
});
29
30
describe('Length validator', () => {
31
+ it('should pass empty value', () => {
32
+ expect(validatorMapper(validators.EXACT_LENGTH)({ threshold: 5 })('')).toBeUndefined();
33
+ });
34
+
35
+ it('should pass undefined value', () => {
36
+ expect(validatorMapper(validators.EXACT_LENGTH)({ threshold: 5 })(undefined)).toBeUndefined();
37
38
39
it('should pass exact length of 5 characters validation', () => {
40
expect(validatorMapper(validators.EXACT_LENGTH)({ threshold: 5 })('12345')).toBeUndefined();
41
0 commit comments