Hey everyone,
I've been working on the extended users module a lot recently.
Something I've gotten stuck on is form validation, we have an "Edit profile" page, where of course you can edit your user information.
I would like to add some validation to the "E-mail" input, in fact I'd like it to behave similar to the password validation, having a "Repeat e-mail" input, I'd like the validation only to throw an error IF the e-mail has been changed (By default the input is filled with the users normal email). Then I'd like the validator to throw an error if the input isn't the same as the "Repeat E-mail" input.
Obviously I don't want another editable for the repeat e-mail, we just want to validate it on the page at time of hitting save.
I've been looking through forums and docs on databound forms as well as normal form validation, I see no way to really do this.
I can create a second input for a "Repeat E-mail" text box and custom validate this to be "Required" and "Validator=matches_field:extended_user_email" but this doesn't allow users to change other parts of their profile without having to enter their email into the repeat e-mail field, which is undesirable.
Any help would be appreciated.
I've been working on the extended users module a lot recently.
Something I've gotten stuck on is form validation, we have an "Edit profile" page, where of course you can edit your user information.
I would like to add some validation to the "E-mail" input, in fact I'd like it to behave similar to the password validation, having a "Repeat e-mail" input, I'd like the validation only to throw an error IF the e-mail has been changed (By default the input is filled with the users normal email). Then I'd like the validator to throw an error if the input isn't the same as the "Repeat E-mail" input.
Obviously I don't want another editable for the repeat e-mail, we just want to validate it on the page at time of hitting save.
I've been looking through forums and docs on databound forms as well as normal form validation, I see no way to really do this.
I can create a second input for a "Repeat E-mail" text box and custom validate this to be "Required" and "Validator=matches_field:extended_user_email" but this doesn't allow users to change other parts of their profile without having to enter their email into the repeat e-mail field, which is undesirable.
Any help would be appreciated.