Browse Source

邮箱正则表达式完善

jack 8 years ago
parent
commit
04369fa9b8
3 changed files with 3 additions and 3 deletions
  1. 1 1
      app/js/companyUpdata1.js
  2. 1 1
      app/js/studentUpdate1.js
  3. 1 1
      app/js/updateinfo1.js

+ 1 - 1
app/js/companyUpdata1.js

176
			})
176
			})
177
			/*校验用户账号*/
177
			/*校验用户账号*/
178
		function userEmail() {
178
		function userEmail() {
179
			var gunf = /^\w+@\w+\.((cn)|(com)|(com\.cn))$/;
179
			var gunf = /^([a-zA-Z0-9]+[_|\_|\.]?)*[a-zA-Z0-9]+@([a-zA-Z0-9]+[_|\_|\.]?)*[a-zA-Z0-9]+\.[a-zA-Z]{2,3}$/;
180
			if(!gunf.test(trim(mail.value))) {
180
			if(!gunf.test(trim(mail.value))) {
181
				plus.nativeUI.toast("请输入正确的邮箱", toastStyle);
181
				plus.nativeUI.toast("请输入正确的邮箱", toastStyle);
182
				return 0;
182
				return 0;

+ 1 - 1
app/js/studentUpdate1.js

168
			})
168
			})
169
			/*校验用户账号*/
169
			/*校验用户账号*/
170
		function userEmail() {
170
		function userEmail() {
171
			var gunf = /^\w+@\w+\.((cn)|(com)|(com\.cn))$/;
171
			var gunf = /^([a-zA-Z0-9]+[_|\_|\.]?)*[a-zA-Z0-9]+@([a-zA-Z0-9]+[_|\_|\.]?)*[a-zA-Z0-9]+\.[a-zA-Z]{2,3}$/;
172
			if(!gunf.test(trim(mail.value))) {
172
			if(!gunf.test(trim(mail.value))) {
173
				plus.nativeUI.toast("请输入正确的邮箱", toastStyle);
173
				plus.nativeUI.toast("请输入正确的邮箱", toastStyle);
174
				return 0;
174
				return 0;

+ 1 - 1
app/js/updateinfo1.js

190
			})
190
			})
191
			/*校验用户账号*/
191
			/*校验用户账号*/
192
		function userEmail() {
192
		function userEmail() {
193
			var gunf = /^\w+@\w+\.((cn)|(com)|(com\.cn))$/;
193
			var gunf = /^([a-zA-Z0-9]+[_|\_|\.]?)*[a-zA-Z0-9]+@([a-zA-Z0-9]+[_|\_|\.]?)*[a-zA-Z0-9]+\.[a-zA-Z]{2,3}$/;
194
			if(!gunf.test(trim(mail.value))) {
194
			if(!gunf.test(trim(mail.value))) {
195
				plus.nativeUI.toast("请输入正确的邮箱", toastStyle);
195
				plus.nativeUI.toast("请输入正确的邮箱", toastStyle);
196
				return 0;
196
				return 0;