Me n My Programming

If Only I Have TIme

ITSB Spring 103 – Adding Error to BindingResult

Sometimes we need to add custom error to the binding result. So here is how we do it:

ObjectError error = new ObjectError("email","An account already exists for this email.");
result.addError(error);

It was extracted from here.

Maybe next time I can try the custom error. Look’s better if we can create our own custom error message.

 

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Information

This entry was posted on September 17, 2013 by in Uncategorized and tagged , .
%d bloggers like this: