mirror of
				https://github.com/TeaOSLab/EdgeAPI.git
				synced 2025-11-05 00:11:55 +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)
 | 
						|
}
 |