You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Here is a sample that demonstrate the current way to implement Web Components form with validation: Web Components Validation
We should consider:
In-Component Validation:
Implement validation logic directly within the Web Components that can be used in a Form(igc-input, igc-textarea, igc-select and ect.). This approach encapsulates validation rules and keeps them self-contained.
Validate input data as users interact with the form elements (e.g., on blur or input change events).
Displaying Validation Messages:
Show validation messages when input is invalid.
Slot Considerations:
Evaluate whether to use existing slots (like helper-text) or create a dedicated slot (e.g., validation-message) for displaying validation feedback. (Using a separate slot allows flexibility in styling and positioning validation messages.)
The text was updated successfully, but these errors were encountered:
Implement validation logic directly within the Web Components that can be used in a Form(igc-input, igc-textarea, igc-select and ect.). This approach encapsulates validation rules and keeps them self-contained.
This is already covered by the existing form associated components.
This definitely merits further exploration and potential integration into the library. In my opinion, dedicating a distinct slot solely for error messages seems advantageous. We'll begin to consider these aspects and aim to have a preliminary implementation shortly.
Here is a sample that demonstrate the current way to implement Web Components form with validation: Web Components Validation
We should consider:
The text was updated successfully, but these errors were encountered: