Nope, that wasn't included. I see the point though.

Does it make more sense to run that before displaying error messages, or afterwards? How to name it? beforeErrorDisplay? afterValidation? beforeFailure?

Either before or after would be fine I think. The reason is that you might want to do something additional to let the user know that some errors occurred. Sometimes an error label and focusing the field isn't enough to grab the user's attention. In my case, I trigger an alert('One or more errors occurred, please adjust the indicated fields'), which forces the user to acknowledge that an error occurred.

As far as naming...maybe onError or something like that? I also like renaming errorPlacement to errorHandler, since you can do much more than just the placement there.

-- Josh

Reply via email to