@@ -909,6 +909,21 @@ public void minLengthValidationValid() throws Exception {
909909 validation ("<input type='text' minlength='5' id='e1' name='k'>\n " , "" , "abcdefghi" );
910910 }
911911
912+ /**
913+ * @throws Exception if an error occurs
914+ */
915+ @ Test
916+ @ Alerts ({"null" ,
917+ "" ,
918+ "true" ,
919+ "false-false-false-false-false-false-false-false-false-true-false" ,
920+ "true" ,
921+ "§§URL§§?k=x" , "2" })
922+ public void validationMinLengthJs () throws Exception {
923+ validation ("<input type='text' id='e1' name='k' minlength='2'>\n " ,
924+ "elem.value = 'x';" , null );
925+ }
926+
912927 /**
913928 * @throws Exception if an error occurs
914929 */
@@ -997,6 +1012,64 @@ public void validationEmpty() throws Exception {
9971012 validation ("<input type='text' id='e1' name='k'>\n " , "" , null );
9981013 }
9991014
1015+ /**
1016+ * @throws Exception if an error occurs
1017+ */
1018+ @ Test
1019+ @ Alerts ({"null" ,
1020+ "x" ,
1021+ "false" ,
1022+ "false-false-false-false-false-false-false-true-false-false-false" ,
1023+ "true" ,
1024+ "§§URL§§" , "1" })
1025+ public void validationMinLength () throws Exception {
1026+ validation ("<input type='text' id='e1' name='k' minlength='2'>\n " , "" , "x" );
1027+ }
1028+
1029+ /**
1030+ * @throws Exception if an error occurs
1031+ */
1032+ @ Test
1033+ @ Alerts ({"null" ,
1034+ "xy" ,
1035+ "true" ,
1036+ "false-false-false-false-false-false-false-false-false-true-false" ,
1037+ "true" ,
1038+ "§§URL§§?k=xy" , "2" })
1039+ public void validationMaxLength () throws Exception {
1040+ validation ("<input type='text' id='e1' name='k' maxlength='2'>\n " , "" , "xyz" );
1041+ }
1042+
1043+ /**
1044+ * @throws Exception if an error occurs
1045+ */
1046+ @ Test
1047+ @ Alerts ({"null" ,
1048+ "" ,
1049+ "true" ,
1050+ "false-false-false-false-false-false-false-false-false-true-false" ,
1051+ "true" ,
1052+ "§§URL§§?k=toooLong" , "2" })
1053+ public void validationMaxLengthJs () throws Exception {
1054+ validation ("<input type='text' id='e1' name='k' maxlength='2'>\n " ,
1055+ "elem.value = 'toooLong';" , null );
1056+ }
1057+
1058+ /**
1059+ * @throws Exception if an error occurs
1060+ */
1061+ @ Test
1062+ @ Alerts ({"null" ,
1063+ "" ,
1064+ "true" ,
1065+ "false-false-false-false-false-false-false-false-false-true-false" ,
1066+ "true" ,
1067+ "§§URL§§?k=toooLong" , "2" })
1068+ public void validationMaxLengthJsEvent () throws Exception {
1069+ validation ("<input type='text' id='e1' name='k' maxlength='2'>\n " ,
1070+ "elem.value = 'toooLong';elem.dispatchEvent(new Event('input'));" , null );
1071+ }
1072+
10001073 /**
10011074 * @throws Exception if an error occurs
10021075 */
0 commit comments