]> saetta.ns0.it Git - rust/zakform/commitdiff
c2rs: added support for validator notempty.
authorAndrea Zagli <azagli@libero.it>
Sat, 20 Jan 2024 11:00:35 +0000 (12:00 +0100)
committerAndrea Zagli <azagli@libero.it>
Sat, 20 Jan 2024 11:00:35 +0000 (12:00 +0100)
src/bin/c2rs.rs

index 9f5587c52bb5f4835adaa888f14d34049b0f1dd1..1f194ea5d38362160eda334eaa5c1d42815ba01b 100644 (file)
@@ -250,6 +250,7 @@ fn main() {
 
                for validator in e.validators {
                        match validator.vtype.as_str() {
+                               "zak_form_element_validator_notempty" => { writeln!(output, r#"fi.add_validator(Box::new(zakform::validators::ValidatorNotEmpty::new("{}_notempty")));"#, e.id); },
                                _ => { },
                        };
                }