Add min number of characters in string validation help

Add min number of characters in string validation help

Hello

I have the following code that validates my form prior to saving...among other things, it checks to make sure the field "claim_num" is not blank. How can I change this code so I can verify if the field "claim_num" has a minimum of 7 characters?

Thanks Paul

  1.             if ($('#claim_num').val() == "" ||
                    $('#loss_date2').val() == "" ||
                    $('#ucr').val() == "" ||
                    $('#loss_type2').val() == 0 ||
                    $('#causecode2').val() == 0 ||
                    $("#claim_status2").val() == "")
                {
                    $('#err_msg').hide('slow').show('slow');
                }
                else
                {
                    $('#err_msg').hide('slow');
                    $('#event_type').val('save');
                    $('#claim_add_frm').submit();
                }
            }