Kel
Kel

Reputation: 7790

Validation in GWT+GAE-based application

Is there any standard approach to input data validation and error displaying in GWT+GAE-based application?

Eclipse plugin generates GWT project with shared.FieldVerifier class, which provides static method for values validation:

public static boolean isValidName(String name) {
    if (name == null) {
        return false;
    }
    return name.length() > 3;
}

isValidName() method is then called on input data in client-side code and server-side code, and if something is wrong, error logics is executed. BTW, I suppose, this approach (set of static validation methods, specific error displaying logics in each case) may be not very scalable.

Also, I found gwt-validation project on code.google.com, but I did not investigate it yet.

Could you please recommend any standard approaches / libraries, which can help to handle validation and error displaying? Is gwt-validation library a standard?

Upvotes: 3

Views: 408

Answers (1)

Frederic Conrotte
Frederic Conrotte

Reputation: 744

The standard is JSR303 and can be used to validate client side as well on the server side.

Please have a look at this topic: GWT JSR 303 client validation

Upvotes: 2

Related Questions