Skip to:

validation after profile edit – how to stop submission and display error

  • I have added custom validaton to profile creation by using the bp_signup_validate hook. The validation actually looks up a code in a separate database, and flags errors if not found using $bp->signup->errors. This prevents submission of a faulty form.
    This works well, but I need it to work after profile edit too. I’ve used the xprofile_data_before_save hook to run the validation code, and the lookup code works, but the form is always submitted even if there’s an error; I can’t see how to flag the error to the user and halt submission as I can on the initial registration form.
    Can someone point me at how to display custom validation error messages and halt submission after a failed custom validation of an edited profile?

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)

You must be logged in to reply to this topic.