Organizational Research By

Surprising Reserch Topic

Best way to validate fields and radio buttons with jquery?

I have several text input fields in my page, and few radio buttons. Now I need to validate them at client side, before I send them to server side (having server side validation too).

I am validating text inputs using jquery and javascript, but now I am wondering is this really the best way to validate them?

And how is this going to work with radio buttons?

$('form').submit(function() {
    return false;

function validateForm(form) {
    var FirstName=form.find('[name=FirstName]').val();
    if (!FirstName) {
        alert('Etunimi puuttuu');
        return false;

asked May 8, 2015 in JAVASCRIPT by rajesh
0 votes

Related Hot Questions

1 Answer

0 votes
answered May 8, 2015 by rajesh