From 44fe4a71acf4f3637aa98ce2a45cc0c792381b33 Mon Sep 17 00:00:00 2001 From: "Michael[tm] Smith" Date: Sun, 27 Dec 2015 14:10:11 +0900 Subject: [PATCH] Allow "minlength" Fixes https://github.com/validator/validator/issues/164 --- web-forms.rnc | 5 +++++ web-forms2.rnc | 2 ++ 2 files changed, 7 insertions(+) diff --git a/web-forms.rnc b/web-forms.rnc index c58e65248..edc00b228 100644 --- a/web-forms.rnc +++ b/web-forms.rnc @@ -31,6 +31,11 @@ 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 9aef19619..0d2699d87 100644 --- a/web-forms2.rnc +++ b/web-forms2.rnc @@ -90,6 +90,7 @@ datatypes w = "http://whattf.org/datatype-draft" & shared-form.attrs.autofocus? & input.attrs.list? & shared-form.attrs.maxlength? + & shared-form.attrs.minlength? & shared-form.attrs.pattern? & shared-form.attrs.placeholder? & shared-form.attrs.readonly? @@ -651,6 +652,7 @@ datatypes w = "http://whattf.org/datatype-draft" empty textarea.attrs &= ( shared-form.attrs.maxlength? + & shared-form.attrs.minlength? & shared-form.attrs.autofocus? & shared-form.attrs.required? & shared-form.attrs.placeholder? -- 2.39.2