Force user email to lower case. Include action on all forms.
This commit is contained in:
parent
1ccb0cad1a
commit
eafde27809
14 changed files with 100 additions and 50 deletions
|
|
@ -4,6 +4,8 @@ package user
|
|||
|
||||
import (
|
||||
"time"
|
||||
|
||||
"entgo.io/ent"
|
||||
)
|
||||
|
||||
const (
|
||||
|
|
@ -51,7 +53,14 @@ func ValidColumn(column string) bool {
|
|||
return false
|
||||
}
|
||||
|
||||
// Note that the variables below are initialized by the runtime
|
||||
// package on the initialization of the application. Therefore,
|
||||
// it should be imported in the main as follows:
|
||||
//
|
||||
// import _ "goweb/ent/runtime"
|
||||
//
|
||||
var (
|
||||
Hooks [1]ent.Hook
|
||||
// NameValidator is a validator for the "name" field. It is called by the builders before save.
|
||||
NameValidator func(string) error
|
||||
// EmailValidator is a validator for the "email" field. It is called by the builders before save.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue