File tree Expand file tree Collapse file tree 1 file changed +26
-0
lines changed Expand file tree Collapse file tree 1 file changed +26
-0
lines changed Original file line number Diff line number Diff line change 248
248
} ) ;
249
249
} ) ;
250
250
251
+ test ( 'isValid()' , function ( ) {
252
+
253
+ $form . empty ( ) ;
254
+ $form . append ( input ( '4000000000000002' , { 'allowing' :'visa' , '' :'creditcard' } ) ) ;
255
+ $form . append ( input ( '' , { 'optional' :'true' , '' :'alphanumeric' } ) ) ;
256
+ $form . append ( input ( '' , 'alphanumeric' ) ) ;
257
+ $form . append ( input ( '4000000000000002' , 'alphanumeric' ) ) ;
258
+
259
+ equal (
260
+ $form . isValid ( false , false , false ) ,
261
+ false
262
+ ) ;
263
+
264
+ $form . empty ( ) ;
265
+ $form . append ( input ( '4000000000000002' , { 'allowing' :'visa' , '' :'creditcard' } ) ) ;
266
+ $form . append ( input ( '' , { 'optional' :'true' , '' :'alphanumeric' } ) ) ;
267
+ $form . append ( input ( 'fff' , 'alphanumeric' ) ) ;
268
+ $form . append ( input ( '4000000000000002' , 'alphanumeric' ) ) ;
269
+
270
+ equal (
271
+ $form . isValid ( false , false , false ) ,
272
+ true
273
+ ) ;
274
+
275
+ } ) ;
276
+
251
277
/*
252
278
* CVV VALIDATION
253
279
*/
You can’t perform that action at this time.
0 commit comments