@@ -80,7 +80,7 @@ def example_backend_validation(val: int) -> bool:
8080
8181NumberExample = Annotated [
8282 int ,
83- Ge (18 ),
83+ Ge (8 ),
8484 Le (99 ),
8585 MultipleOf (multiple_of = 3 ),
8686 Predicate (example_backend_validation ),
@@ -165,61 +165,61 @@ def form_generator(state: State):
165165 class TestForm0 (FormPage ):
166166 model_config = ConfigDict (title = "Form Title Page 1" )
167167
168- number : NumberExample
169- list : TestExampleNumberList
170- # list_list: unique_conlist(TestExampleNumberList, min_items=1, max_items=5)
171- # list_list_list: unique_conlist(
172- # unique_conlist(Person2, min_items=1, max_items=5),
173- # min_items=1,
174- # max_items=2,
175- # ) = [1, 2]
176- test : TestString
177- textList : unique_conlist (TestString , min_items = 1 , max_items = 5 )
178- # numberList: TestExampleNumberList = [1, 2]
179- person : Person2
180- personList : unique_conlist (Person2 , min_items = 2 , max_items = 5 )
181- # ingleNumber: NumberExample
182- # number0: Annotated[int, Ge(18), Le(99)] = 17
168+ number : NumberExample = ["1" , "2" , "3" ]
169+ personList : TestPersonList
183170
184171 form_data_0 = yield TestForm0
185172
186173 class TestForm1 (FormPage ):
187174 model_config = ConfigDict (title = "Form Title Page 1" )
188175
189- contact_name2 : StringExample
176+ contact_name2 : TestString = "RRR"
190177 options : ListChoices
191178
192179 form_data_1 = yield TestForm1
193180
194- class TestForm2 (FormPage ):
181+ class TestForm2 (SubmitFormPage ):
195182 model_config = ConfigDict (title = "Form Title Page 2" )
196183
197- contact_name3 : StringExample
184+ contact_name3 : TestString = "Ruben"
198185 age : NumberExample
199186
200187 form_data_2 = yield TestForm2
201188
202- class TestForm3 (FormPage ):
203- model_config = ConfigDict (title = "Form Title Page 3" )
204-
205- contact_person : Person
206-
207- form_data_3 = yield TestForm3
208-
209- class TestForm5 (FormPage ):
210- model_config = ConfigDict (title = "Form Title Page 4" )
211-
212- contact_person_list : TestPersonList
213-
214- form_data_5 = yield TestForm5
215-
216189 return (
217190 form_data_0 .model_dump ()
218191 | form_data_1 .model_dump ()
219192 | form_data_2 .model_dump ()
220- | form_data_3 .model_dump ()
221- | form_data_5 .model_dump ()
222193 )
223194
224195 post_form (form_generator , state = {}, user_inputs = form_data )
225196 return "OK!"
197+
198+ # list: TestExampleNumberList
199+ # list_list: unique_conlist(TestExampleNumberList, min_items=1, max_items=5)
200+ # list_list_list: unique_conlist(
201+ # unique_conlist(Person2, min_items=1, max_items=5),
202+ # min_items=1,
203+ # max_items=2,
204+ # ) = [1, 2]
205+ # test: TestString
206+ # textList: unique_conlist(TestString, min_items=1, max_items=5)
207+ # numberList: TestExampleNumberList = [1, 2]
208+ # person: Person2
209+ # personList: unique_conlist(Person2, min_items=2, max_items=5)
210+ # ingleNumber: NumberExample
211+ # number0: Annotated[int, Ge(18), Le(99)] = 17
212+
213+ # class TestForm3(FormPage):
214+ # model_config = ConfigDict(title="Form Title Page 3")
215+
216+ # contact_person: Person
217+
218+ # form_data_3 = yield TestForm3
219+
220+ # class TestForm5(FormPage):
221+ # model_config = ConfigDict(title="Form Title Page 4")
222+
223+ # contact_person_list: TestPersonList
224+
225+ # form_data_5 = yield TestForm5
0 commit comments