We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 6ac7280 commit 22fbf83Copy full SHA for 22fbf83
Specs/Forms/Form.Validator.js
@@ -19,6 +19,11 @@ describe('Form.Validator', function(){
19
expect(element.get('validatorProps')).toEqual({minLength: 10});
20
});
21
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
+
27
it('should get the validator properties from a JSON string in the validatorProps attribute', function(){
28
var element = new Element('input').setProperty('validatorProps', '{minLength: 10, maxLength:20}');
29
expect(element.get('validatorProps')).toEqual({minLength: 10, maxLength: 20});
0 commit comments