2014-08-27 39 views
1

引導驗證只有場包含值引導驗證只有場包含值

我想只能用我的引導驗證,如果

我得到低於使用引導驗證該代碼

<tr> 
<td><b>1</b></td> 
<td> 
<select class="form-control" name="DaySelection1"> 
<option value="">Select</option> 
<option value="wed">Wed</option> 
<option value="thu">Thu</option> 
<option value="fri">Friday</option> 
</select> 
</td> 

<td class="form-group"> 
<input type="text" class="form-control" name="digits1" 
       required 
       min="000" 
       data-bv-greaterthan-inclusive="true" 
       data-bv-greaterthan-message="The input must be greater than or equal to 0" 

       max="999" 
       data-bv-lessthan-inclusive="false" 
       data-bv-lessthan-message="The input must be less than or equal to 999" /> 
</td> 
<td class="form-group"><input type="number" data-bv-digits-message="true" class="form-control" name="big1" id="name1" size="6"></td> 
<td><input type="number" class="form-control" name="small1" size="6"></td> 
</tr> 

我只想運行我的驗證行

The name of each input is goes by e.g "digits$i", "big$i", "small$i"

其中$ i是

1 to 10 

一個整數來識別輸入型

的每個單排我如何改變我的引導代碼。

因爲目前我有一個for循環,打印出相同的字段,這些字段是不是填了也拿到了此驗證完成,我只是想驗證行,進行了DaySelection值

回答

0

我用

data-bv-threshold="1" 

解決我的問題。