views:

32

answers:

4

Hi guys:

I am a noivce at JQuery.

I'm curious about if there is any plug-in or libraries to help developers validate whether any input value over a set of form elements is not entered (empty string).

I can just think of using a function to achieve this feature. Any better idea?

Thanks.

+2  A: 

try Validation

Reigel
+1  A: 

Take a look at validate plugins in jQuery

rahul
+1  A: 

You can implement one, it's not that hard (for strings, at least):

function is_empty(input){
    input = input.replace(/\s/g, '');
    if(input.length <= 0) return true;
    return false;
}

It's simple, small and suits your needs.

Ben
+1  A: 

You could try YAV, which lets you define the validation rules as HTML labels.

Prutswonder