You are not closing the brackets in theses rules: PlannedInvitationsOther and PlannedAttendanceOther
PlannedInvitationsOther: { required: function(element){ return $("input=[name='PlannedInvitations'][value='Other']").is(':checked'); }, number: true }, PlannedAttendanceOther: { required: function(element) {return $("input=[name='PlannedAttendance'][value='Other']").is(':checked');}, number:true }, On Fri, Jul 31, 2009 at 16:29, PictureMan <polskystud...@gmail.com> wrote: > > I've actually confined (I think) the error to somewhere in the below > code. The 6 lines that are commented out contain the problem, as it > stands now (with commented out sections) the page validates, when I > uncomment either group, I get the same error. I these 2 cases the > required line is looking at a radio button with a specific value - > think last item in a list of radio buttons, with a text box for more > other info if that radio button is checked. > > > > rules: { > AgencyName: "required", > Address1: "required", > CityStateZip: "required", > phone: {required: true, number: true, minlength: 10, > maxlength: > 10}, > Key_Contact: "required", > EmailAddress: {required: true, email: true}, > EventAgencyName: "required", > EventAddress: "required", > EventCity: "required", > EventZip: "required", > EventState: "required", > EventContact: "required", > EventContactPerson: "required", > EventPhoneNumber: {required: true, number: true, > minlength: 10, > maxlength: 10}, > EventEmailAddress: {required: true, email: true}, > EventWebsite: {url: true}, > Message: "required", > Budget: {required:true, number:true}, > CabinsSoldTarget: {required:true, number:true}, > GrossSalesTarget: {required:true, number:true}, > OtherCruiseLine: { > required: "#Other:checked" > }, > DestinationsPicked: "required", > PlannedInvitations: "required", > // PlannedInvitationsOther: { > // required: function(element){return > $("input= > [name='PlannedInvitations'][value='Other']").is(':checked');}, > // number: true, > > PlannedAttendance: "required", > // PlannedAttendanceOther: { > // required: function(element) {return > $("input= > [name='PlannedAttendance'][value='Other']").is(':checked');}, > // number:true, > IntendToParticipate: "required" > }, > On Jul 31, 3:08 pm, Leonardo K <leo...@gmail.com> wrote: > > This problem occurs when a comma is missing. Post your entire code of the > > validation. > > > > On Fri, Jul 31, 2009 at 16:00, PictureMan <polskystud...@gmail.com> > wrote: > > > > > When I add this rule to a page with the other rules, my page stops > > > validating. > > > Works fine if I don't add it. > > > > > What this is for is a check box next to a input box. IF the check box > > > is checked, the field is mandatory. > > > > > OtherCruiseLine: { > > > required: function(element) { > > > return $("input[name='CruiseLinesPicked'][value='Other']").is > > > (':checked'); > > > } > > > > > without this rule the page validates. With this I get an error of: > > > missing } after property list. > > > > > But not sure what's wrong.. > > > > > Thanks! >