0

I use this plugin for jquery validation: http://jqueryvalidation.org

This is not problem when I need: required, required number etc., I just put in element class like this:

<input type="text" id="" value="" name="name"size="40" class="required"

In my example I need required number but only if is input not blank, when i use

    <input type="text" id="" value="" name="name"size="40" class="required number"

user can't leave this input.

4

1 回答 1

4

leave out required

<input type="text" id="" value="" name="name"size="40" class="number" />

Demo: Fiddle

于 2013-08-20T17:17:40.503 回答