Form Validation for a range of numbers that include decimals

I’m wanting my form to validate numbers that include decimals.

Currently, we are requesting GPA so the form will need to validate numbers from 0-4.
The number can be 0.25 or 4.20 or 3 or 3.0.

This is the piece of JS I’m currently using and is placed Before the Body End Tag:

  lp.jQuery(function($) {
    var ruleID = 'custom';
    var field = 'gpa';
    var message = 'Please enter a valid GPA value. (IE - 3.5)';
    var rules =[field];
    $.validator.addMethod(ruleID, function(value, field) {
      var valid = ( /^([0-4])\d{0,9}(\.\d{1,3})?%?$/.test(value) );
      return valid || (!rules.required && !value);
    }, message);
    rules[ruleID] = true;

Here’s the link to the page:

Any help on this will be greatly appreciatedddd!!!