コードをもっと正確にしたいのですが、次のコードスニペットをより適切に書くことを提案してくれる人はいますか?
<script>
var frmvalidator = new Validator("SubscriptionForm");
frmvalidator.EnableOnPageErrorDisplaySingleBox();
frmvalidator.EnableMsgsTogether();
frmvalidator.addValidation("usernameReg","req","Please enter your Username");
frmvalidator.addValidation("usernameReg","maxlen=20", "Max length for Username is 20");
frmvalidator.addValidation("usernameReg","alpha_s","Username can contain alphabetic chars only");
frmvalidator.addValidation("usernameReg","req","Please enter your Username");
frmvalidator.addValidation("usernameReg","maxlen=20", "Max length for Username is 20");
frmvalidator.addValidation("usernameReg","alpha_s","Username can contain alphabetic chars only");
frmvalidator.addValidation("fname","req","Please enter your First Name");
frmvalidator.addValidation("fname","maxlen=20", "Max length for FirstName is 20");
frmvalidator.addValidation("fname","alpha_s","Name can contain alphabetic chars only");
frmvalidator.addValidation("lname","req","Please enter your Last Name");
frmvalidator.addValidation("lname","maxlen=20","For LastName, Max length is 20");
frmvalidator.addValidation("email","maxlen=50");
frmvalidator.addValidation("email","req");
frmvalidator.addValidation("email","email");
</script>