Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/gwt/3.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
Google app engine GWT和x2B中的验证;基于GAE的应用程序_Google App Engine_Gwt - Fatal编程技术网

Google app engine GWT和x2B中的验证;基于GAE的应用程序

Google app engine GWT和x2B中的验证;基于GAE的应用程序,google-app-engine,gwt,Google App Engine,Gwt,在基于GWT+GAE的应用程序中,是否有任何标准的输入数据验证和错误显示方法 Eclipse插件使用shared.FieldVerifier类生成GWT项目,该类为值验证提供静态方法: public static boolean isValidName(String name) { if (name == null) { return false; } return name.length() > 3; } 然后对客户端代码和服务器端代码中的输入数

在基于GWT+GAE的应用程序中,是否有任何标准的输入数据验证和错误显示方法

Eclipse插件使用shared.FieldVerifier类生成GWT项目,该类为值验证提供静态方法:

public static boolean isValidName(String name) {
    if (name == null) {
        return false;
    }
    return name.length() > 3;
}
然后对客户端代码和服务器端代码中的输入数据调用isValidName()方法,如果出现错误,则执行错误逻辑。顺便说一句,我想,这种方法(一组静态验证方法,在每种情况下都有特定的错误显示逻辑)可能伸缩性不强

我也发现了,但我还没有调查


您能推荐一些标准方法/库吗?这些方法/库有助于处理验证和错误显示?gwt验证库是标准吗?

该标准是JSR303,可用于验证客户端以及服务器端

请看一下这个主题: