$('#register').bootstrapValidator(
{
message :'This value is not valid',
feedbackIcons : {
valid :'glyphicon glyphicon-ok',
invalid :'glyphicon glyphicon-remove',
validating :'glyphicon glyphicon-refresh'},
fields : {
name : {
validators : {
notEmpty : {
message :'账号不能为空'},
stringLength : {
min :6,
max :12,
message :'账号由6-12个字符组成'},
regexp : {
regexp :/^[a-zA-Z][a-zA-Z0-9]+$/,
message :'账号只能由字母数字组成,必须由字母开头'}
}
},
password:{
validators:{
notEmpty : {
message :'密码不能为空'},
stringLength : {
min :6,
max :6,
message :'密码必须由6个字母数字组成'},
regexp : {
regexp :/^[a-zA-Z0-9]+$/,
message :'密码只能由字母数字组成'}
}
},
realname:{
validators:{
notEmpty : {
message :'姓名不能为空'}
}
},
number:{
validators:{
notEmpty : {
message :'学号不能为空'},
stringLength : {
min :8,
max :8,
message :'学号必须由8位字符组成'},
regexp : {
regexp :/^2018(\d{4})+$/,
message :'请输入正确的学号'}
}
},
email:{
validators:{
notEmpty : {
message :'邮箱不能为空'},
regexp : {
regexp :/^[A-Za-z0-9\u4e00-\u9fa5]+@[a-zA-Z0-9_-]+(\.[a-zA-Z0-9_-]+)+$/,
message :'请输入正确的邮箱格式'}
}
}
},
password1:{
validators:{
notEmpty : {
message :'学院不能为空'},
stringLength : {
min :15,
max :15,
},
regexp : {
regexp :/^[a-zA-Z0-9]+$/,
message :'学院只能由字母数字组成'}
}
},
password2:{
validators:{
notEmpty : {
message :'所在系不能为空'},
stringLength : {
min :6,
max :6,
},
regexp : {
regexp :/^[a-zA-Z0-9]+$/,
message :'所在系只能由字母数字组成'}
}
},
password3:{
validators:{
notEmpty : {
message :'所在班级不能为空'},
stringLength : {
min :6,
max :6,
},
regexp : {
regexp :/^[a-zA-Z0-9]+$/,
message :'所在班级只能由字母数字组成'}
}
},
password4:{
validators:{
notEmpty : {
message :'生源地不能为空'},
stringLength : {
min :6,
max :6,
},
regexp : {
regexp :/^[a-zA-Z0-9]+$/,
message :'生源地只能由字母数字组成'}
}
},
password5:{
validators:{
notEmpty : {
message :'备注不能为空'},
stringLength : {
min :6,
max :6,
},
regexp : {
regexp :/^[a-zA-Z0-9]+$/,
message :'备注只能由字母数字组成'}
}
},
});
});
用户注册
登陆账号:
登陆密码:
姓名:
性别:
男女
学号:
邮箱:
所在学院:
所在系:
所在班级:
年份:
--入学年份(届)--
2016
2017
2018
2019
生源地:
备注:
注册