Skip to content

Allow binding validity on input, select and textarea elements #3257

Open
@bbuhler

Description

@bbuhler

I would like to add a read-only binding for validity property (ValidityState) on form elements.

For Example

<script>
  let email;
  let emailValidity = {};
</script>

<input type="email" required bind:value={email} bind:validity={emailValidity}>

Email is valid: {emailValidity.valid}

I already implemented the changes on my fork. I wanted to create a PR but there it mentions if my PR implements a new feature I should raise an issue to discuss it before. So I here it is.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions