Zend 形式中的英镑符号 (£) 长度或字符集问题?
我的密码字段(Zend Form)允许字符串长度为 6,20,
但是当我输入“guru£”(字符串长度 5:fasle)时,它会返回 true,而不会出现 minlenth 错误,并且如果我输入“guru££££”( string length: true) 返回最大长度错误。
任何人都可以帮我重新评级这个吗?提前感谢大师
my password field (Zend Form) is allowing string length 6,20
but When I type "guru£"(string lenth 5:fasle) it is returning true without minlenth error and same time if I type "guru££££" (string length: true) it is return max lenth error.
can any one help me out regrading this one. and Thanks in advance-Guru
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您似乎正在使用某种多字节字符编码,可能是 UTF-8。您必须明确告诉 Zend_Validate 以便它正常工作:
或者您可以在创建验证器对象时执行此操作:
请参阅 Zend_Validate > Zend Framework 手册中的值编码。
You seem to be using some multibyte character encoding, probably UTF-8. You must explicitly tell this to Zend_Validate so that it works correctly:
Or you can do it while creating validator object:
See Zend_Validate > Encoding of values in Zend Framework manual.
您使用 Zend Validation 类吗?
http://framework.zend.com/manual/en/zend.validate .set.html
我认为特别值得注意的是“使用不同语言”部分。
Are you using the Zend Validation class?
http://framework.zend.com/manual/en/zend.validate.set.html
Of particular note is the Using different languages section, I think.