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

[checkbox] Add required property #938

Closed
paales opened this issue Apr 11, 2018 · 6 comments · Fixed by #7285
Closed

[checkbox] Add required property #938

paales opened this issue Apr 11, 2018 · 6 comments · Fixed by #7285
Assignees
Labels

Comments

@paales
Copy link

paales commented Apr 11, 2018

We use the element for agreements on our checkout process, and a checkbox is always required to be filled in. We'd like to be able to make the field required and add an error message when the customer doesn't fill it in.

@NickdeK
Copy link

NickdeK commented Apr 13, 2018

Here is a pull request to enable this: vaadin/vaadin-checkbox#85

@web-padawan
Copy link
Member

Related request for Flow counterpart: https://github.com/vaadin/vaadin-checkbox-flow/issues/112

@web-padawan
Copy link
Member

We could consider using vaadin-custom-field to show required indicator.

However, as mentioned at https://github.com/vaadin/vaadin-custom-field/issues/78#issuecomment-633576433, then there is another problem: custom field currently only works with elements that have validate() method. So we are kinda stuck here.

@web-padawan
Copy link
Member

See also vaadin/vaadin-checkbox#188 (comment)

@vaadin-bot vaadin-bot transferred this issue from vaadin/vaadin-checkbox May 19, 2021
@vaadin-bot vaadin-bot added enhancement New feature or request needs design Design is needed vaadin-checkbox labels May 19, 2021
@web-padawan web-padawan changed the title Add required property to element [checkbox] Add required property May 20, 2021
@rolfsmeds
Copy link
Contributor

Acceptance Criteria: vaadin/platform#5190

@rolfsmeds
Copy link
Contributor

Also see: vaadin/flow-components#3397

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
5 participants