Skip to content
View in the app

A better way to browse. Learn more.

Web Designer Forum

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

LiveValidation Dropdown Menu

Featured Replies

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

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.