1

I've written an extension to do some additional processing on submitted form content within the ExpressionEngine publish page, however there is a scenario where I want to return an error to the user if a value they have specified is invalid.

Is there a way to do this with an extension, some function I can call to return a validation error but retain the form input so the user isn't forced to start again?

Obviously I could just use 'show_error' but this seems a little brutal and not what would be expected. :)

1

Check out this array:

ee()->form_validation->_error_array

You can check its contents and add to it. I forget the best hook to use this in, but it might be entry_submission_start?

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.