Skip to content

amp-form: Support auto formatting #12079

@aghassemi

Description

@aghassemi

Many form inputs use JS to auto format fields such as dates, credit card numbers and phone numbers as user types (e.g. auto insert separators, stop accepting input after x charters, etc..)

For a few examples see jQuery Mask Plugin: https://igorescobar.github.io/jQuery-Mask-Plugin/

We should support such use-cases in AMP, if we somehow manage to make it super generic and use the RegEx specified in validation's "pattern" (with an explicit opt-in) that would be awesome, otherwise a decent subset of common cases ( essentially the ones supported by the jQuery plugin) would be a good start.

/to @cvializ
/cc @rudygalfi @ericlindley-g

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions