November 20, 201214 yr Hi there guys, I've recently came across LiveValidation (http://livevalidation.com/) but I'm having a little trouble getting the validation to work with dropdowns. There are no examples in the examples page (http://livevalidation.com/examples), nor can I find any forum mentions. Can I ask if anyone has ever used this with a drop down? Or would anyone know how to edit the script to allow validation on dropdowns? Link to the main Javascript: http://www.livevalid...n_standalone.js In particular what I'm wanting is the following function to work with a drop down. <form> <input name="example" type="text" id="example" value="" /> <script type="text/javascript"> var f1 = new LiveValidation('example'); f1.add(Validate.Presence); </script> </form> The functioin above simply checks if the user hasn't entered anything into the 'example' field. I'm wanting the same thing to happen when the user hasn't selected an option from the drop down, something like below. <form> <select name="example"> <option value=""></option> <option value="One">1</option> <option value="Two">2</option> </select> <script type="text/javascript"> var f1 = new LiveValidation('example'); f1.add(Validate.Presence); </script> </form> Any idea on how to go about doing this?
Create an account or sign in to comment