feat: implement new ValidatedForm and error handling for text fields

Note that text fields only accept Region 15 email addresses right now. We should add extra domains in the future.
This commit is contained in:
alphafetus committed 2025-12-29 18:07:13 -05:00
1 parent 139ffdbe55
commit 74e7111820
9 files changed
+285 -67

No files matched your search

+4 -4
View File
@@ -5,7 +5,7 @@ use leptos::prelude::*;
use leptos_oidc::{AuthLoaded, Authenticated};
use leptos_router::hooks::{use_navigate, use_params};
use crate::common::{ExpandableInfo, ScholarshipFormParams, SubmitStatus, ValueType};
use crate::components::{ActionButton, Banner, ChipsList, Loading, OutlinedTextField, Panel, RadioList, Row};
use crate::components::{ActionButton, Banner, ChipsList, Loading, OutlinedTextField, Panel, RadioList, Row, TextFieldType};
use super::UnauthenticatedPage;
use traits::{AsReactive, ReactiveCapture};
use crate::common::ComparisonData;
@@ -461,7 +461,7 @@ fn ScholarshipForm(
disabled=elements_disabled
data_member="amount_per_award"
data_map=reactive_info.data
input_type="number"
input_type=TextFieldType::Number
/>
</Row>
<Row>
@@ -471,7 +471,7 @@ fn ScholarshipForm(
disabled=elements_disabled
data_member="num_awards"
data_map=reactive_info.data
input_type="number"
input_type=TextFieldType::Number
/>
</Row>
<Row>
@@ -481,7 +481,7 @@ fn ScholarshipForm(
disabled=elements_disabled
data_member="total_awards"
data_map=reactive_info.data
input_type="number"
input_type=TextFieldType::Number
/>
</Row>
<Row>