Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: haacked/aspnet-client-validation
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v0.9.2
Choose a base ref
...
head repository: haacked/aspnet-client-validation
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v0.9.3
Choose a head ref
  • 4 commits
  • 9 files changed
  • 2 contributors

Commits on Dec 12, 2023

  1. Only send checkbox/radio values for remote validation if checked

    Doing remote validation for a checkbox value always sends the input's value whether the checkbox is checked or not and since the value is set to "true" for checkboxes the value will always be true on the server side even if you unchecked the checkbox when the remote validation was triggered. This change fixes this by only sending the value if the checkbox was checked. This is similar to what jquery-validation-unobtrusive does to handle remote checkbox validation.
    
    I also added radio buttons to the check but I don't think it will work correctly for them since there will be multiple inputs with the same name selector for radio buttons but only the first one is handled which might not be the one that is clicked. So I'm not sure what the correct approach is for remote validation of radio buttons but this at least seems to be more in line with how jquery-validation-unobtrusive handles them.
    davidkarlsson committed Dec 12, 2023
    Configuration menu
    Copy the full SHA
    a1d2b9e View commit details
    Browse the repository at this point in the history
  2. Add demo to prove fix works

    haacked committed Dec 12, 2023
    Configuration menu
    Copy the full SHA
    15bdd9a View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    6bb07bd View commit details
    Browse the repository at this point in the history
  4. Merge pull request #83 from haacked/haacked/checkbox-remote-validatio…

    …n-fix
    
    Checkbox remote validation fix
    haacked authored Dec 12, 2023
    Configuration menu
    Copy the full SHA
    637efeb View commit details
    Browse the repository at this point in the history
Loading