Skip to content

Conversation

@maliming
Copy link
Member

@maliming maliming commented Jun 18, 2025

Resolves #22937

How to test:

Add a Razor page to test this script.

image

image

image

@page

@section Scripts {
<script>
$(document).ready(function() {

    jQuery.validator.setDefaults({
        debug: true,
        success: "valid"
    });

    $("#commentForm").validate({
        rules: {
            age: {
                required: true,
                number: true
            },
            range: {
                required: true,
                range: [100, 100000]
            }
        }
    });
});
</script>
}

<form class="cmxform" id="commentForm" method="get" action="">
    <fieldset>
        <p>
            <label for="age">Number (required)</label>
            <input id="age" type="text" name="age" required>
        </p>
        <p>
            <label for="range">Range (required, minimum 100, maximum 100000):</label>
            <input type="text" id="range" name="range" required>
        </p>
        <p>
            <input type="submit" value="Validate!">
        </p>
    </fieldset>
</form>

@codecov
Copy link

codecov bot commented Jun 18, 2025

Codecov Report

Attention: Patch coverage is 0% with 4 lines in your changes missing coverage. Please review.

Project coverage is 52.21%. Comparing base (036f2ed) to head (a805926).
Report is 79 commits behind head on dev.

Files with missing lines Patch % Lines
...eryValidation/JQueryValidationScriptContributor.cs 0.00% 4 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##              dev   #23099      +/-   ##
==========================================
- Coverage   52.23%   52.21%   -0.02%     
==========================================
  Files        3215     3215              
  Lines      103636   103640       +4     
  Branches     7877     7878       +1     
==========================================
- Hits        54131    54119      -12     
- Misses      47859    47874      +15     
- Partials     1646     1647       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@maliming maliming requested a review from EngincanV June 18, 2025 10:02
@EngincanV EngincanV enabled auto-merge June 19, 2025 07:13
@EngincanV EngincanV merged commit 0ba65ef into dev Jun 19, 2025
3 of 5 checks passed
@EngincanV EngincanV deleted the abp.jquery.validate.js branch June 19, 2025 07:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

MVC localization binding/validation not working with decimals and dates

3 participants