以下是密码字段的angularjs
代码:
<input type="password" class="form-control" name="password" ng-model="signup.registerPassword" ng-minlength="8" >
<small class="errorMessage" data-ng-show="signupForm.registerPassword.$dirty && signupForm.registerPassword.$error.minlength"> Minimum 8 characters.</small>
<small class="errorMessage" data-ng-show="signupForm.registerPassword.$dirty && signupForm.registerPassword.$error.required"> Enter password again.</small>
当我输入低于8个字符的密码时,它没有显示任何错误。
我正在做的错误是什么,我该如何解决?
答案 0 :(得分:1)
registerPassword
的值为ng-model
。 signupForm
将通过name属性在其中包含其字段。正如您向name="password"
字段中的password
字段提供password
一样,然后内部角度将signupForm
字段放在signupForm.registerPassword
范围变量中。
将signupForm.password
更改为<small class="errorMessage" data-ng-show="signupForm.password.$dirty && signupForm.password.$error.minlength"> Minimum 8 characters.</small>
<small class="errorMessage" data-ng-show="signupForm.password.$dirty && signupForm.password.$error.required"> Enter password again.</small>
<强>标记强>
import sys
from cx_Freeze import setup, Executable
path = ["pystest"]+sys.path
build_exe_options = {"packages": ["os","serial"], "excludes": ["tkinter"],"path":path}
#add more package what are using for your app?
base = None
if sys.platform == "win32":
base = "Win32GUI"
setup( name = "My test program",
version = "3.1",
description = "My test",
options = {"build_exe": build_exe_options},
executables = [Executable("pystest.py", base=base)])