ng之邮箱校验
2024-10-08 05:15:21
$scope.sendMail = function () { // console.log($scope.inputValue.inputEmail); //校验邮箱格式是否正确 if (!$scope.inputValue.inputEmail) { alert({ type: '', title: '温馨提示', msg: '请输入您的邮箱地址' }); return; } else { var reg = /^([a-zA-Z0-9]+[_|\_|\.]?)*[a-zA-Z0-9]+@([a-zA-Z0-9]+[_|\_|\.]?)*[a-zA-Z0-9]+\.[a-zA-Z]{2,3}$/; //正则表达式 if (!reg.test($scope.inputValue.inputEmail)) { alert({ title: '温馨提示', msg: '邮箱格式有误,请检查' }); return false; } }
}
最新文章
- Linux不使用useradd创建用户
- linux下如何使用sftp命令【转】
- jsp,图片显示
- LinQ To Object 基本用法
- Ionic学习笔记四 一些问题处理
- lua 的 WriteFile 和 ReadFile
- 超越luabind的luaBridge
- delphi列表视图组件(TListView)使用方法|实例
- Nodejs学习笔记——Assert(断言)
- Break the Chocolate(规律)
- NOI2007 生成树计数
- java IO 类库的基本架构
- flask项目开发中,遇到http 413错误
- [css 实践篇] 解决悬浮的<;header>; <;footer>;遮挡内容的处理技巧
- AI deeplab
- Openvswitch手册(8): ovs-vsctl的DB的操作
- 错误解决记录------------mysql连接本地数据库显示";can&#39;t get hostname for your address";
- 【二分】Producing Snow @Codeforces Round #470 Div.2 C
- golang string int int64转换
- Druid介绍2