ampproject / ampproject/worker-dom

Form validation support

Open
#401 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
3.3k
Forks
154
PR merge metrics
No merged PRs in 30d

Description

Related to [#21449](https://github.com/ampproject/amphtml/issues/21449): WorkerDOM currently doesn't support the [Constraint Validation API](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation) which would be very useful for building multi-page, complex forms that are currently difficult to handle with `amp-bind` and `amp-form` alone.

Probably the easiest way to go would be implementing `checkValidity`, `reportValidity` and `setCustomValidity` as async methods evaluated on the main thread.

Contributor guide

Open the contributing guide

Research direction

Start by reading the linked Constraint Validation API documentation and related issue #21449, then inspect WorkerDOM’s existing form API surface. Define support for async checkValidity, reportValidity, and setCustomValidity with evaluation on the main thread; done means these methods work for the form scenarios described.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
frontend, web-dev
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.