]> code.delx.au - gnu-emacs-elpa/commitdiff
Make minlength checking behave as expected
authorMichael[tm] Smith <mike@w3.org>
Thu, 7 Jan 2016 12:53:52 +0000 (21:53 +0900)
committerMichael[tm] Smith <mike@w3.org>
Thu, 7 Jan 2016 12:53:52 +0000 (21:53 +0900)
This makes the "minlength" attribute a non-error for input[type=password]
and input[type=text], as expected.

Fixes https://github.com/validator/validator/issues/208 Thanks @StevenMaude

web-forms.rnc
web-forms2.rnc

index edc00b22848d57e72712db58470664486a8a1b04..c58e652485fdf0beca0b328ef5ddf32fa5c785c8 100644 (file)
@@ -31,11 +31,6 @@ datatypes w = "http://whattf.org/datatype-draft"
                        common.data.integer.non-negative
                }
 
-       shared-form.attrs.minlength =
-               attribute minlength {
-                       common.data.integer.non-negative
-               }
-
        shared-form.attrs.size = 
                attribute size {
                        common.data.integer.positive
index 0d2699d873fbdd2c7ef6a2e09253cb54a92e1bab..ebd3ee4533f1ff78a28cc9d26b23b9eb00e89c32 100644 (file)
@@ -83,6 +83,11 @@ datatypes w = "http://whattf.org/datatype-draft"
                        string
                }
 
+       shared-form.attrs.minlength =
+               attribute minlength {
+                       common.data.integer.non-negative
+               }
+
 ## Shared attributes for <input>
                
        shared-input.attrs =
@@ -134,6 +139,7 @@ datatypes w = "http://whattf.org/datatype-draft"
                &       shared-form.attrs.required?
                &       shared-form.attrs.placeholder?
                &       shared-form.attrs.inputmode?
+               &       shared-form.attrs.minlength?
                )
 
 ## Password Field: <input type='password'>, Extensions
@@ -145,6 +151,7 @@ datatypes w = "http://whattf.org/datatype-draft"
                &       shared-form.attrs.pattern?
                &       shared-form.attrs.placeholder?
                &       shared-form.attrs.required?
+               &       shared-form.attrs.minlength?
                )
 
 ## Checkbox <input type='checkbox'>, Extensions