I have a domain class for user registration. During the registration, user needs to enter email twice, and those two needs to match. I do not want to store re-entered email and just want to use that for verification. Any suggestion?
My domain class looks like:
class MyUser{
String name
String email
Integer telephone
}
and my view looks like:
<label for="reEmail" id="reEmail">
<g:message code="myUser.reEnter.label" default="Re-enter Email:" id="reEnter"/></label>
<g:textField name="reEmail"/>
Thanks in advance
A good way to handle this is to use a transient field in your class.
Like so….
Then, in you view you can deal with the field just like any other…
Then just validate it in your controller…