Skip to content

Commit 22fbf83

Browse files
kulbakinSergioCrisostomo
authored andcommitted
add spec for the fix allowing spaces in validator params
1 parent 6ac7280 commit 22fbf83

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

Specs/Forms/Form.Validator.js

+5
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,11 @@ describe('Form.Validator', function(){
1919
expect(element.get('validatorProps')).toEqual({minLength: 10});
2020
});
2121

22+
it('should get the properties from string with spaces', function(){
23+
var input = new Element('input', {'data-validators': 'label:\'primary category\''});
24+
expect(input.get('validatorProps')).toEqual({label: "primary category"});
25+
});
26+
2227
it('should get the validator properties from a JSON string in the validatorProps attribute', function(){
2328
var element = new Element('input').setProperty('validatorProps', '{minLength: 10, maxLength:20}');
2429
expect(element.get('validatorProps')).toEqual({minLength: 10, maxLength: 20});

0 commit comments

Comments
 (0)