@@ -552,6 +552,7 @@ class jsRuleSets {
552552
553553 // To Check, whether the element have value or not.
554554 static isSet ( elem ) {
555+ // If field is not required, then return "true".
555556 if ( false === elem . required ) return true ;
556557 let status = true ;
557558 let value = elem . value ;
@@ -562,6 +563,7 @@ class jsRuleSets {
562563
563564 // To Check Element with Min Condition.
564565 static min ( elem ) {
566+ // If field is not required, then return "true".
565567 if ( false === elem . required ) return true ;
566568 let status = true ;
567569 let value = elem . value ;
@@ -573,6 +575,7 @@ class jsRuleSets {
573575
574576 // To Check Element with Max Condition.
575577 static max ( elem ) {
578+ // If field is not required, then return "true".
576579 if ( false === elem . required ) return true ;
577580 let status = true ;
578581 let value = elem . value ;
@@ -584,6 +587,7 @@ class jsRuleSets {
584587
585588 // To Check Element Email is Valid or Not.
586589 static email ( elem ) {
590+ // If field is not required, then return "true".
587591 if ( false === elem . required ) return true ;
588592 let status = true ;
589593 let email = elem . value ;
@@ -601,6 +605,7 @@ class jsRuleSets {
601605
602606 // To Check Element Phone Value is Valid or Not.
603607 static phone ( elem , pattern ) {
608+ // If field is not required, then return "true".
604609 if ( false === elem . required ) return true ;
605610 let status = true ;
606611 if ( elem . value === '' ) status = false ;
@@ -609,6 +614,7 @@ class jsRuleSets {
609614
610615 // To Compare two Elements Values.
611616 static compare ( elem1 ) {
617+ // If field is not required, then return "true".
612618 if ( false === elem1 . required ) return true ;
613619
614620 let elem2_id = elem1 . getAttribute ( 'data-check' ) ;
0 commit comments