From 6e7c7c331e7f6692be6c7d39fb9485792f0d3513 Mon Sep 17 00:00:00 2001 From: "Michael[tm] Smith" Date: Thu, 7 Jan 2016 21:53:52 +0900 Subject: [PATCH] Make minlength checking behave as expected 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 | 5 ----- web-forms2.rnc | 7 +++++++ 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/web-forms.rnc b/web-forms.rnc index edc00b228..c58e65248 100644 --- a/web-forms.rnc +++ b/web-forms.rnc @@ -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 diff --git a/web-forms2.rnc b/web-forms2.rnc index 0d2699d87..ebd3ee453 100644 --- a/web-forms2.rnc +++ b/web-forms2.rnc @@ -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 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: , 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 , Extensions -- 2.39.2