Thanks for the tip. I got validation to work with the SAEF, but it took a bit of work.
The validation code relies on each form field to have a specific CSS class. Since EE auto generates the form’s html, I used jquery to dynamically add the CSS class to each of the form’s input fields. (I suppose I could have fiddled with the EE code to do this, but jquery seemed an easy way to go.)
Unfortunately, jQuery and Prototype don’t play well together out of the box, so I had to use a workaround for that. But, it’s working well now.
Here’s the code that’s different from the example above. Add all of this below your EE form (and of course, declare your jQuery reference in the page’s header.
// Jump through hoops to get prototype and jquery to play nicely
// http://wordpress.org/support/topic/141394?replies=7
$j=jQuery.noConflict();
// Use jQuery via $j(...)
$j(document).ready(function(){
$j("#field_id_38").addClass("required");
$j("#field_id_40").addClass("required");
$j("#field_id_39").addClass("notrequired");
$j("#category").addClass("notrequired");
});
var valid = new Validation('entryform', {immediate : true}, {stopOnFirst : false});
My only complaint is that this validation is all being done in javascript which can be turned off by the user. Perhaps an EE feature request could be created to add a checkbox or EE parameter that makes categories required?