|
52 | 52 | EVENT_VALIDATION_SUCCESS = "validationSuccess", |
53 | 53 | EVENT_INPUT_IN_PROGRESS = "inputInProgress"; |
54 | 54 |
|
55 | | - if( $.fn.restrictedTextField.types == undefined || $.fn.restrictedTextField.types == null ) { |
| 55 | + if( $.fn.restrictedTextField.types === undefined || $.fn.restrictedTextField.types === null ) { |
56 | 56 | init(); |
57 | 57 | } |
58 | 58 |
|
|
62 | 62 | positiveFloat = /^[\.\d]$|^\.$|^\d*\.$/, |
63 | 63 | negativeFloat = /^0\.?$|^-\.?$|^-\d*\.$/; |
64 | 64 |
|
65 | | - if( $.fn.restrictedTextField.types == undefined || $.fn.restrictedTextField.types == null ) { |
| 65 | + if( $.fn.restrictedTextField.types === undefined || $.fn.restrictedTextField.types === null ) { |
66 | 66 | $.fn.restrictedTextField.types = []; |
67 | 67 | } |
68 | 68 |
|
|
102 | 102 | var regexes = $.fn.restrictedTextField.types[ settings.type ]; |
103 | 103 |
|
104 | 104 | if( isNothing(regexes) ) { |
105 | | - if( $.fn.RestrictedTextFieldConfig.customTypes != undefined && $.fn.RestrictedTextFieldConfig.customTypes != null ) { |
| 105 | + if( $.fn.RestrictedTextFieldConfig.customTypes !== undefined && $.fn.RestrictedTextFieldConfig.customTypes !== null ) { |
106 | 106 | regexes = $.fn.RestrictedTextFieldConfig.customTypes[ settings.type ]; |
107 | 107 | } |
108 | 108 |
|
|
153 | 153 | var jqThis = $( this ); |
154 | 154 |
|
155 | 155 | // The user is entering data, but has yet to reach the minimum number of characters needed to satisfy |
156 | | - // the regular expression in $.fn.restrictedTextField.types. We can't check against that yet because |
157 | | - // it would result in the user being unable to enter anything. Until we've reached the minimum number |
158 | | - // of required characters, allow the user to input any character which would satisfy the regular |
| 156 | + // the regular expression in regexes.fullRegex. We can't check against that yet because it would |
| 157 | + // result in the user being unable to enter anything. Until we've reached the minimum number of |
| 158 | + // required characters, allow the user to input any character which would satisfy the regular |
159 | 159 | // expression. If we've reached the minimum required number of characters, perform the validation |
160 | | - // against the regular expression in $.fn.restrictedTextField.types. |
| 160 | + // against the regular expression in regexes.fullRegex. |
161 | 161 |
|
162 | | - if( regexes.partialRegex != undefined && regexes.partialRegex != null ) { |
| 162 | + if( regexes.partialRegex !== undefined && regexes.partialRegex !== null ) { |
163 | 163 | if( regexes.partialRegex.test(this.value) ) { |
164 | 164 | jqThis.trigger( EVENT_INPUT_IN_PROGRESS ); |
165 | 165 | } else { |
|
177 | 177 | }; |
178 | 178 |
|
179 | 179 | function isNothing( value ) { |
180 | | - return value == undefined || value == null || value.length < 1; |
| 180 | + return value === undefined || value === null || value.length < 1; |
181 | 181 | } |
182 | 182 |
|
183 | 183 | function isClassName( obj, className ) { |
|
0 commit comments