Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/html/72.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Html 如何允许输入长度为0且>;=6._Html_Input_Content Length - Fatal编程技术网

Html 如何允许输入长度为0且>;=6.

Html 如何允许输入长度为0且>;=6.,html,input,content-length,Html,Input,Content Length,目前我已经建立了这样一个密码表单 <input id="password" name="password" type="password" minlength='6' ng-model="model.password" placeholder="Password" required/> 这里的密码长度大于6。 但是默认用户没有密码,并且允许0长度的密码。 我不知道怎么做。 必须如下所示(不使用javascript) 这可能吗?您想使用

目前我已经建立了这样一个密码表单

  <input id="password" name="password" type="password" minlength='6' ng-model="model.password"
         placeholder="Password"
         required/>

这里的密码长度大于6。 但是默认用户没有密码,并且允许0长度的密码。 我不知道怎么做。 必须如下所示(不使用javascript)


这可能吗?

您想使用以下方法:


如何使用
必需的
和长度为
0
?这没有意义。如果您要求用户输入其当前密码,则无需强制执行特定格式。如果您要求他们选择新密码,则您不再允许他们没有密码。
  <input id="password" name="password" type="password" length='0 || > 6' ng-model="model.password"
         placeholder="Password"
         />