XoopsModules25x/smallworld

View on GitHub
assets/js/jquery.validate.js

Summary

Maintainability
B
4 hrs
Test Coverage

Function validate has 81 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    xoops_smallworld.fn.validate = function (options) {
        options = xoops_smallworld.extend({
            expression: "return true;",
            message: "",
            error_class: "ValidationErrors",
Severity: Major
Found in assets/js/jquery.validate.js - About 3 hrs to fix

    Function validate_field has 27 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

            function validate_field(id) {
                var self = xoops_smallworld(id).attr("id");
                var expression = 'function Validate(){' + options['expression'].replace(/VAL/g, 'xoops_smallworld(\'#' + self + '\').val()') + '} Validate()';
                var validation_state = eval(expression);
                if (!validation_state) {
    Severity: Minor
    Found in assets/js/jquery.validate.js - About 1 hr to fix

      There are no issues that match your filters.

      Category
      Status