question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Support basic validation rules on amp-selector

See original GitHub issue

Looking for a workaround for this feature? See couple of them below in the comments


The most basic one would be to support required.

This will probably require implementing the different validation/input interfaces the browser provides for built in inputs. For example, the following APIs are used on input:

  • checkValidity():boolean
  • validity:ValidityState
  • validityMessage:string

These should probably already work on the current amp-selector.

  • focus():void
  • blur event

Extra bonus points to support:

  • min and max for multiple selection limitation.

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
IamAltacommented, May 31, 2018

@aghassemi, Just a quick follow=up. You’re Swell! We got #1 working with ease! Thank you. And, enjoy the net neutrality that CA just passed 😃

0reactions
aghassemicommented, Jun 21, 2019
Read more comments on GitHub >

github_iconTop Results From Across the Web

amp-selector: Add support for required attribute for form ...
As such, it supports attributes disabled, form, multiple, and name just like a ... Support basic validation rules on amp-selector #6930.
Read more >
Examples of Validation Rules - Salesforce Help
Validation rules verify that the data a user enters in a record meets the standards you specify before the user can save the...
Read more >
Restrict data input by using validation rules - Microsoft Support
Validations rules help you check data as it is added to your Access desktop database which improves accuracy and consistency of data entry....
Read more >
Documentation: <amp-selector> - amp.dev
Validation. See amp-selector rules in the AMP validator specification. Need more help? You've read this document a dozen times but it doesn't really...
Read more >
How to Use Validation Rules in Salesforce (+ Examples)
Data validation supports better Salesforce data quality. ... Take basic Account validation rules further by creating multiple validation ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found