Comment 1 for bug 507978

Revision history for this message
Mardo Del Cid (mardodcp) wrote :

well... you can create a transient field, so that field will not be persisted in your database, your User model would be like this:

@Entity
public class User extends Model {

 @Email
 @Required
 public String email;

 @Required
 @Password
 @Equals("passwordConfirmation")

        //another fields...
}

-------

and your view like this:

#{crud.form}

 #{crud.custom 'password'}

  <label for="object_password">&{'password'}</label>
  <input type="password" id="object_password" name="object.password" value="">

  <label for="object_passwordConfirmation">&{'passwordConfirmation'}</label>
  <input type="password" id="object_passwordConfirmation" name="object.passwordConfirmation">

 #{/crud.custom}

#{/crud.form}