inovex / elements

Lovingly crafted ui components based on web components. Works well with all Frameworks - including Angular, React and Vue.
https://elements.inovex.de
MIT License
69 stars 9 forks source link

inputs: add form validation functionalities #423

Open janivo opened 3 years ago

janivo commented 3 years ago

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

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.

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.

Summary

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

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

janivo commented 3 years ago

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

janivo commented 7 months ago

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