Implement error appearances for all input components #5

Closed
opened 2025-09-04 11:47:47 +00:00 by BobdaFett · 1 comment
BobdaFett commented 2025-09-04 11:47:47 +00:00 (Migrated from github.com)

Components do not currently have a way to show when they are in an invalid state.
This information should be checked every time the focus is lost, and can use the Leptos Show component (an example can be found here)

The typical control flow would be checking if the component is in an error state within the Show component, and only Showing the inner components if the statement evaluates to true. The tough part will be how we can procedurally determine if any given input is truly valid or not. Most will simply have a required prop, where they simply need to be filled, however some have format requirements (like an email) even if they're not required (i.e. a non-required text field is still invalid if it contains an invalid email).

Components do not currently have a way to show when they are in an invalid state. This information should be checked every time the focus is lost, and can use the Leptos `Show` component (an example can be found [here](https://book.leptos.dev/view/06_control_flow.html)) The typical control flow would be checking if the component is in an error state within the `Show` component, and only `Show`ing the inner components if the statement evaluates to true. The tough part will be how we can procedurally determine if any given input is truly valid or not. Most will simply have a `required` prop, where they simply need to be filled, however some have format requirements (like an email) even if they're not required (i.e. a non-required text field is still invalid if it contains an invalid email).
BobdaFett commented 2026-01-06 19:22:11 +00:00 (Migrated from github.com)

This was finished as part of #41.

This was finished as part of #41.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: r15-software-dev/scholarships-rs#5