Well, if it serves someone I did it in the following way. In Item.form.class.php scroll down to the contact_email_text function, and after this I added the following code:
static public function check_email_text($item = null) {
parent::generic_input_text('contactEmail2', '', null, false, false);
return true;
}
Later, in the script that performs the validations (With jquery Validation) add the following code within the rules, after the validation of contactEmail
contactEmail : { //This already exist
required:true,
email: true
},
contactEmail2 : { //This is for the new mail re-type field
equalTo: "#contactEmail"
},
After, in the messages add one that corresponds to the validation of the field:
contactEmail : { //This already exist
required:'Email is required',
email: 'Email format is not valid'
},
contactEmail2 : { //This is for the new mail re-type field
equalTo: "The email entered does not match"
},
To finish, invoke the function below your current mail field, for example:
<div class="control-group">
<label class="control-label" for="contactEmail"><?php _e('E-mail', 'bender'); ?></label>
<div class="controls">
<?php ItemForm::contact_email_text(); ?>
</div>
</div>
<div class="control-group">
<label class="control-label" for="contactEmail2"><?php _e('Re-type e-mail', 'bender'); ?></label>
<div class="controls">
<?php ItemForm::check_email_text(); ?>
</div>
</div>
Note: I used Item.form.class.php since I wanted the re-type email field to be on my Item-post.php page, but it also works on the registration page since you do not really save the data from this field in the database of data. Although if you like you can do the same but within User.form.class.php for the registration page, the changes are only names.