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

inputs: add form validation functionalities #423

Open
11 of 30 tasks
janivo opened this issue Sep 9, 2021 · 2 comments · May be fixed by #1163
Open
11 of 30 tasks

inputs: add form validation functionalities #423

janivo opened this issue Sep 9, 2021 · 2 comments · May be fixed by #1163
Assignees
Labels
discussion This issue needs to be discussed further feature This issue introduces a new feature
Milestone

Comments

@janivo
Copy link
Collaborator

janivo commented Sep 9, 2021

Feature Request

When using our input elements (ino-input, ino-select, ino-checkbox, ...) I want to be able to use them in a form with the relevant functionalities.

Required

Add the required attribute to all input elements and check if an invalid state is already implemented

  • ino-autocomplete
  • ino-checkbox
  • ino-datepicker
  • ino-input
  • ino-input-file
  • ino-radio(-group)
  • ino-range
  • ino-select
  • ino-switch
  • ino-textarea

open a new issue, if there is no visual indicator for an invalid state

Focus & Blur

For some validation mechanisms, it is necessary to trigger the blur & focus methods of the input components.

  • ino-autocomplete
  • ino-checkbox
  • ino-datepicker
  • ino-input
  • ino-input-file
  • ino-radio(-group)
  • ino-range
  • ino-select
  • ino-switch
  • ino-textarea

Validation States & Message

As is the case for the ino-input, we should provide properties to mark the component as invalid from the outside, following our controlled components concept. Furthermore, it is necessary to provide a way to show custom error messages as well.

  • ino-autocomplete
  • ino-checkbox
  • ino-datepicker
  • ino-input
  • ino-input-file
  • ino-radio(-group)
  • ino-range
  • ino-select
  • ino-switch
  • ino-textarea

Summary

In the end, every input component should have the following methods/properties (names are WIP):

  • required
  • setFocus()
  • setBlur()
  • error
  • helper (maybe rename to helperText?)
  • helperPersistent
  • helperValidation
  • showLabelHint

for an explanation of each property, have a look at the API of the ino-input element

@janivo janivo added feature This issue introduces a new feature discussion This issue needs to be discussed further new This issue has been recently added and has no estimation labels Sep 9, 2021
@janivo
Copy link
Collaborator Author

janivo commented Sep 9, 2021

#306 should be used as a starting point for the Focus & Blur functionalities

@janivo janivo added est-medium new This issue has been recently added and has no estimation and removed new This issue has been recently added and has no estimation labels Sep 24, 2021
@silentHoo silentHoo removed the new This issue has been recently added and has no estimation label Oct 29, 2021
@janivo janivo removed the est-medium label May 24, 2022
@pfecht pfecht added this to the Housekeeping milestone Jun 22, 2022
@iandi09 iandi09 self-assigned this Jan 3, 2024
@janivo
Copy link
Collaborator Author

janivo commented Feb 5, 2024

This feature might have a big impact on this story: #1232

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
discussion This issue needs to be discussed further feature This issue introduces a new feature
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants