有人在下面的表单中帮助我进行 javacript 验证,它应该检查 fname 和 lname 中不应该有数字/数字,stnumber 应该有特定的大小(大小)状态,并且 pincode 应该匹配是否可以与 javascript 验证匹配??? ??
<form id="user" method="post" action="" onsubmit="return validateForm()">
<span>First Name:</span>
<input type="text" class="input" id="fname" name="fname" required>
<span>Last Name</span>
<input type="text" class="input" id="lname" name="lname" required>
<span>Student Number</span>
<input type="text" class="input" id="stn" name="stn" required>
<span>Student address</span>
<input type="text" class="input" id="stad" name="stad" required>
<span>Town/suburb</span>
<input type="text" class="input" id="town" name="town" required>
<span>State</span>
<select name="state" id="state">
<option selected>--select--</option>
<option>AAA</option>
<option>BBB</option>
</select>
<span>Postal Code</span>
<input type="text" class="input" id="pcode" name="pcode" required>