check runs all checks and user-defined validators on the builder.
()
| 226 | |
| 227 | // check runs all checks and user-defined validators on the builder. |
| 228 | func (_u *UserUpdate) check() error { |
| 229 | if v, ok := _u.mutation.Email(); ok { |
| 230 | if err := user.EmailValidator(v); err != nil { |
| 231 | return &ValidationError{Name: "email", err: fmt.Errorf(`ent: validator failed for field "User.email": %w`, err)} |
| 232 | } |
| 233 | } |
| 234 | return nil |
| 235 | } |
| 236 | |
| 237 | // Modify adds a statement modifier for attaching custom logic to the UPDATE statement. |
| 238 | func (_u *UserUpdate) Modify(modifiers ...func(u *sql.UpdateBuilder)) *UserUpdate { |