changeset 116:88b409324611 draft

Uploaded
author greg
date Tue, 29 May 2018 13:28:32 -0400
parents 3b59d42b80e8
children 9c998fd06628
files insect_phenology_model.xml
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/insect_phenology_model.xml	Tue May 29 13:22:24 2018 -0400
+++ b/insect_phenology_model.xml	Tue May 29 13:28:32 2018 -0400
@@ -105,10 +105,10 @@
             <when value="no"/>
             <when value="yes">
                 <param name="start_date" type="text" value="" label="Start date" help="Format must be yyyy-mm-dd">
-                    <validator type="expression" message="Date must have the format yyyy-mm-dd">len(value.split('=')[0])==4 and isinstance(value.split('=')[0], int) len(value.split('=')[1])==2 and isinstance(value.split('=')[1], int) and len(value.split('=')[2])==2 and isinstance(value.split('=')[2], int)</validator>
+                    <validator type="expression" message="Date must have the format yyyy-mm-dd">len(value.split('-')[0])==4 and int(value.split('-')[0]) and len(value.split('-')[1])==2 and int(value.split('-')[1]) and len(value.split('-')[2])==2 and int(value.split('-')[2])</validator>
                 </param>
                 <param name="end_date" type="text" value="" label="End date" help="Format must be yyyy-mm-dd">
-                    <validator type="expression" message="Date must have the format yyyy-mm-dd">len(value.split('=')[0])==4 and isinstance(value.split('=')[0], int) len(value.split('=')[1])==2 and isinstance(value.split('=')[1], int) and len(value.split('=')[2])==2 and isinstance(value.split('=')[2], int)</validator>
+                    <validator type="expression" message="Date must have the format yyyy-mm-dd">len(value.split('-')[0])==4 and int(value.split('-')[0]) and len(value.split('-')[1])==2 and int(value.split('-')[1]) and len(value.split('-')[2])==2 and int(value.split('-')[2])</validator>
                 </param>
             </when>
         </conditional>