Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

force validation of min/max values on Byte Value inputs #9

Open
crashdemons opened this issue Apr 28, 2021 · 1 comment
Open

force validation of min/max values on Byte Value inputs #9

crashdemons opened this issue Apr 28, 2021 · 1 comment
Labels
bug Something isn't working

Comments

@crashdemons
Copy link
Member

doesn't seem to be enforced in firefox or chrome [despite being set] when typing in manually.

@crashdemons crashdemons added the bug Something isn't working label Apr 28, 2021
@crashdemons
Copy link
Member Author

browser prompts for validity don't get triggered for two reasons:

  • the button for combining inputs isn't a Submit type of input or submit button
  • the output portion of the app is technically a separate <form> tag for styling reasons

a solution is to put the entire app into the same form and change the button to submit. although there needs to be a way to cancel navigation from submitting the form and instead call the xor script.

Alternatively, we can check ourselves:

https://caniuse.com/?search=checkValidity
input.checkValidity() doesn't force the browser prompt for validity though, an overlay or alert would need to be shown.
polyfill or wrapper seems doable for this method?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant