一个form下有四个table,table之间的切换通过next和back的button控制,怎样通过点击next的button,来验证这个table的数据?
简化的代码:
<div ms-controller="test">
<form ms-validate="@validate" id="form">
<div ms-visible="1==@step">
<input type="text" ms-duplex-number="@aa" ms-rules='{required:true}' /><br>
<button type="button" ms-click="@next(1)">next</button>
</div>
<div ms-visible="2==@step">
<input type="text" ms-duplex-number="@bb" ms-rules='{required:true}' /><br>
<br>
<button type="button" ms-click="@next(2)">next</button>
<button type="button" ms-click="@back(2)">back</button>
</div>
<div ms-visible="3==@step">
<input type="text" ms-duplex-number="@cc" ms-rules='{required:true}' /><br>
<br>
<button type="button" ms-click="@next(3)">next</button>
<button type="button" ms-click="@back(3)">back</button>
</div>
<div ms-visible="4==@step">
<input type="text" ms-duplex-number="@dd" ms-rules='{required:true}' /><br>
<br>
<button type="button" ms-click="@back(4)">back</button>
<input class="aa" type="submit" value="ok">
</div>
</form>
</div>