ZK輸入控制元件的約束
阿新 • • 發佈:2018-11-11
約束條件 | 解析 |
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;"/>
效果圖