Adding a javascript function to check the validation of a record with a budget.