mirror of
				https://github.com/TeaOSLab/EdgeAdmin.git
				synced 2025-11-04 05:00:25 +08:00 
			
		
		
		
	
		
			
	
	
		
			13 lines
		
	
	
		
			371 B
		
	
	
	
		
			Go
		
	
	
	
	
	
		
		
			
		
	
	
			13 lines
		
	
	
		
			371 B
		
	
	
	
		
			Go
		
	
	
	
	
	
| 
								 | 
							
								// Copyright 2022 Liuxiangchao iwind.liu@gmail.com. All rights reserved. Official site: https://goedge.cn .
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								package utils
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								import "regexp"
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								var emailReg = regexp.MustCompile(`(?i)^[a-z\d]+([._+-]*[a-z\d]+)*@([a-z\d]+[a-z\d-]*[a-z\d]+\.)+[a-z\d]+$`)
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								// ValidateEmail 校验电子邮箱格式
							 | 
						||
| 
								 | 
							
								func ValidateEmail(email string) bool {
							 | 
						||
| 
								 | 
							
									return emailReg.MatchString(email)
							 | 
						||
| 
								 | 
							
								}
							 |