From 8cf5dc09db5514d73bc64c1dd48e8f8fe604316a Mon Sep 17 00:00:00 2001 From: Andrea Zagli <azagli@libero.it> Date: Sun, 14 May 2017 17:26:49 +0200 Subject: [PATCH] Added test for ZakFormValidatorComposite. --- data/zakformtests/xml/main.xml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/data/zakformtests/xml/main.xml b/data/zakformtests/xml/main.xml index 063566a..b53419c 100644 --- a/data/zakformtests/xml/main.xml +++ b/data/zakformtests/xml/main.xml @@ -141,4 +141,16 @@ and some tabs <validator type="zak_form_validator_compare_date" type_comp="lt" element1="date_from" format1="%d/%m/%Y" element2="date_to" format2="%d/%m/%Y"></validator> + <validator type="zak_form_validator_composite"> + <logic type="or" message="It needs to be valued «Birthday» or «Date from» and «date to»"> + <logic type="and"> + <validator type="zak_form_element_validator_notempty" element="date_from"></validator> + <validator type="zak_form_element_validator_notempty" element="date_to"></validator> + </logic> + <logic type="and"> + <validator type="zak_form_element_validator_notempty" element="birthday"></validator> + </logic> + </logic> + </validator> + </zakform> -- 2.49.0