社区
Web 开发
帖子详情
validator 框架 不能包含“test”
ivan_fang
2010-01-10 09:06:14
如题,请问我该如何去实现?
我用的是struts1.3
...全文
55
8
打赏
收藏
validator 框架 不能包含“test”
如题,请问我该如何去实现? 我用的是struts1.3
复制链接
扫一扫
分享
转发到动态
举报
写回复
配置赞助广告
用AI写文章
8 条
回复
切换为时间正序
请发表友善的回复…
发表回复
打赏红包
crazylaa
2010-01-10
打赏
举报
回复
html:text
你可以看看他的html.tld里面的text标签下面有没有对应于onblur的方法。。。
刚查了1.1的struts-html.tld,有,但是是:onblur
B要小写。
<tag>
<name>text</name>
<tagclass>org.apache.struts.taglib.html.TextTag</tagclass>
<attribute>
<name>accesskey</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
</attribute>
<attribute>
<name>alt</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
</attribute>
<attribute>
<name>altKey</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
</attribute>
<attribute>
<name>disabled</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
</attribute>
<attribute>
<name>indexed</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
</attribute>
<attribute>
<name>maxlength</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
</attribute>
<attribute>
<name>name</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
</attribute>
<attribute>
<name>onblur</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
</attribute>
<attribute>
<name>onchange</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
</attribute>
<attribute>
<name>onclick</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
</attribute>
<attribute>
<name>ondblclick</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
</attribute>
<attribute>
<name>onfocus</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
</attribute>
<attribute>
<name>onkeydown</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
</attribute>
<attribute>
<name>onkeypress</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
</attribute>
<attribute>
<name>onkeyup</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
</attribute>
<attribute>
<name>onmousedown</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
</attribute>
<attribute>
<name>onmousemove</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
</attribute>
<attribute>
<name>onmouseout</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
</attribute>
<attribute>
<name>onmouseover</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
</attribute>
<attribute>
<name>onmouseup</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
</attribute>
<attribute>
<name>property</name>
<required>true</required>
<rtexprvalue>true</rtexprvalue>
</attribute>
<attribute>
<name>readonly</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
</attribute>
<attribute>
<name>size</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
</attribute>
<attribute>
<name>style</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
</attribute>
<attribute>
<name>styleClass</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
</attribute>
<attribute>
<name>styleId</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
</attribute>
<attribute>
<name>tabindex</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
</attribute>
<attribute>
<name>title</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
</attribute>
<attribute>
<name>titleKey</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
</attribute>
<attribute>
<name>value</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
</attribute>
</tag>
ivan_fang
2010-01-10
打赏
举报
回复
实现客户端的javascript验证,是在<form onSubmit=”return validateLonginActionForm(this);”>配置提交事件和使用<html:javascript formName=”loginActionForm”/>
[Quote=引用 5 楼 crazylaa 的回复:]
引用 4 楼 ivan_fang 的回复:
我用的就是客户端验证呀,validator框架也有客户端严重的功能的呀
真的啊,那是我的错。。sorry
[/Quote]
ivan_fang
2010-01-10
打赏
举报
回复
<input type="text" id="username" name="username" value="" class="t_input" onBlur="checkUserName()" tabindex="2" />
该功能就是在注册用户的时候,输入用户名,鼠标离开输入框后,会验证输入的用户名是否合适。
在struts中该怎么写呢,因为onBlur这种写在html:text中是错误的
crazylaa
2010-01-10
打赏
举报
回复
[Quote=引用 4 楼 ivan_fang 的回复:]
我用的就是客户端验证呀,validator框架也有客户端严重的功能的呀
[/Quote]
真的啊,那是我的错。。sorry
ivan_fang
2010-01-10
打赏
举报
回复
我用的就是客户端验证呀,validator框架也有客户端严重的功能的呀
crazylaa
2010-01-10
打赏
举报
回复
前台js验证么好了咯。啥都弄到服务器端去影响性能。
ivan_fang
2010-01-10
打赏
举报
回复
就是说比如我注册页面的用户名,不能包含“test”这个词,我该如何用struts的validator框架进行验证,validator.xml这个文件该怎么写?
aft_momo
2010-01-10
打赏
举报
回复
请求参数不能包含“test”???详细一点啊。汗
PHP开发
框架
Windwalker.zip
Windwalker 是一个时髦的 PHP
框架
,简化了 Web 应用的开发。这是一个轻量级、易用以及完全解耦的 PHP
框架
。功能非常强大而且灵活,其 package system 可以帮助我们构建更灵活的企业级应用。 Windwalker 基于 Joomla Framework. 我们参考了 Joomla 的架构,并重写了 80% 的代码,增加了一些新的包。同时参考了很多例如 Laravel、Symfony 和 Rails
框架
的优点。 可通过 Composer 进行安装: { "require" : { "windwalker/framework" : "~2.0" } } 然后通过如下命令创建应用(Starter 是一个基本的应用骨架): composer create-project windwalker/starter windwalker ~2.0 Starter 应用的默认样子:
包含
如下包: Application Authenticate Cache Compare Console Controller Crypt Data Database DataMapper DI Dom Environment Event Filesystem Filter Form Html IO Language Loader Middleware Model Profiler Query Record Registry Renderer Router Session String
Test
Uri Utilities
Valid
a
tor
View 标签:Windwalker Web
框架
composed-
valid
ations:有意义的Javascript验证库
组合验证 有意义的 Javascript 验证库。 指数
包含
验证器 多验证器 多重验证器 结构验证器 序列验证器 委托验证器 字段验证器 否定验证器 所有验证器 改写验证器 助手库 json(值) isString(值) isFunction(值) isArray(值) is
Valid
a
tor
(值) 守卫验证器(值) 守卫验证错误(值)
包含
(列表,值) 地图(列表,迭代器) 减少(列表,初始,迭代器) 电梯(功能) humanizeFieldName(name) 更多信息 介绍 在我们看到任何代码之前,我想先解释一下composed-
valid
ations的基础。 整个
框架
围绕一个非常简单的界面工作,请记住,它是:
valid
a
tor
.
test
( value ) ; 所有验证器都响应这个接口,每个验证器都是一个小块,只验证一个值。 为了验证复杂
SpringMVC+Mybatis+Shiro+Bootstrap实战
快速增长实战经验的课程 技术选型: 核心
框架
:Spring Framework 4.X 视图
框架
:Spring MVC 4.X 持久层
框架
:MyBatis 3.X /Mybatis-plus 2.1.8 表格插件:Bootstrap Table 表单验证插件:Bootstrap
Valid
a
tor
日期...
struts
Valid
a
tor
框架
和 ActionForm得介绍
struts
Valid
a
tor
框架
和 ActionForm 1.
Valid
a
tor
框架
和 ActionForm
Valid
a
tor
框架
不能
用于验证标准的 ActionForm 类。如果要使用
Valid
a
tor
框架
,应该采用 ActionForm 1.
Valid
a
tor
框架
和 ActionForm
Valid
a
tor
框架
不能
用于验证标准的 ActionForm 类。如果要
在SSH
框架
中使用
Valid
a
tor
框架
这节介绍如何在SSH
框架
中使用
Valid
a
tor
框架
,
Valid
a
tor
框架
采用基于xml文件来配置验证规则,它主要依赖两个jar包:commons-
valid
a
tor
-1.3.0.jar和oro-2.0.8.jar,要在SSH使用
Valid
a
tor
框架
,必须把这两个jar包引用进来,其实Struts
框架
已
包含
这两个jar包,所以我们不用再单独引入了。 要在SSH
框架
中使用
Valid
a
Web 开发
81,095
社区成员
341,711
社区内容
发帖
与我相关
我的任务
Web 开发
Java Web 开发
复制链接
扫一扫
分享
社区描述
Java Web 开发
社区管理员
加入社区
获取链接或二维码
近7日
近30日
至今
加载中
查看更多榜单
社区公告
暂无公告
试试用AI创作助手写篇文章吧
+ 用AI写文章