validation1 for the form
This commit is contained in:
@@ -123,6 +123,10 @@ pub async fn run_ui() -> Result<()> {
|
||||
app_state.ensure_form_editor(&path, &config, || {
|
||||
FormState::new(initial_profile.clone(), initial_table.clone(), initial_field_defs)
|
||||
});
|
||||
#[cfg(feature = "validation")]
|
||||
UiService::apply_validation1_for_form(&mut grpc_client, &mut app_state, &path)
|
||||
.await
|
||||
.ok();
|
||||
buffer_state.update_history(AppView::Form(path.clone()));
|
||||
router.navigate(Page::Form(path.clone()));
|
||||
|
||||
@@ -516,6 +520,21 @@ pub async fn run_ui() -> Result<()> {
|
||||
prev_view_profile_name = current_view_profile;
|
||||
prev_view_table_name = current_view_table;
|
||||
table_just_switched = true;
|
||||
// Apply character-limit validation for the new form
|
||||
#[cfg(feature = "validation")]
|
||||
if let (Some(prof), Some(tbl)) = (
|
||||
app_state.current_view_profile_name.as_ref(),
|
||||
app_state.current_view_table_name.as_ref(),
|
||||
) {
|
||||
let p = format!("{}/{}", prof, tbl);
|
||||
UiService::apply_validation1_for_form(
|
||||
&mut grpc_client,
|
||||
&mut app_state,
|
||||
&p,
|
||||
)
|
||||
.await
|
||||
.ok();
|
||||
}
|
||||
}
|
||||
Err(e) => {
|
||||
app_state.update_dialog_content(
|
||||
|
||||
Reference in New Issue
Block a user