ZK输入控件的约束

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/qq_40646143/article/details/83745456

 

Constraint 约束规则
约束条件 解析
no empty 输入不能为空
no future 不能是以后的时间。用于datebox
no negtive 不能输入负数。用于intbox
no past 不能是过去的时间。用于datebox
no positive 不能是正数。用于intbox
no today 不能是今天。用于datebox
no zero 不能是0。用于intbox
between yyyyMMdd and yyyyMMdd

控制时间在一个范围内。

例:<datebox constraint="between 20181105 and 20181203"/>

after yyyyMMdd 例:<datebox constraint="after 20181105"/>

end_before

end_after

after_start

after_end

指定弹出的错误提示框的位置。

例:<textbox constraint="no empty, start_before"/>

例如

 <z:intbox id="num2" constraint="no zero;"/>

效果图

                    

多个条件判断使用如下(使用";")

 <z:intbox id="num2" constraint="no negative;no zero;"/>

效果图

猜你喜欢

转载自blog.csdn.net/qq_40646143/article/details/83745456
zk