在 struts2 中禁用验证并使用我自己的自定义验证 [英] disabling the Validation in struts2 and use my own customized validation

查看:33
本文介绍了在 struts2 中禁用验证并使用我自己的自定义验证的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在 struts2 中开发 web 项目,我想通过禁用 struts2 验证在我自己的自定义验证中进行验证,因为如果一个字段被发回,它将检查所有字段,但我只想在提交时检查.

I'm developing web project in struts2 and I want validation in my own customized validation by disabling the struts2 validation, because if one field is being sent back it will check all fields but I want to check only at the time of submit.

推荐答案

我不完全明白,但有一种叫做 @SkipValidation 的东西,你可以用它来注释方法.

I don't fully get the idea, but there's a thing called @SkipValidation you can annotate methods with.

这篇关于在 struts2 中禁用验证并使用我自己的自定义验证的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆