check runs all checks and user-defined validators on the builder.
()
| 595 | |
| 596 | // check runs all checks and user-defined validators on the builder. |
| 597 | func (_u *UserUpdateOne) check() error { |
| 598 | if v, ok := _u.mutation.Email(); ok { |
| 599 | if err := user.EmailValidator(v); err != nil { |
| 600 | return &ValidationError{Name: "email", err: fmt.Errorf(`ent: validator failed for field "User.email": %w`, err)} |
| 601 | } |
| 602 | } |
| 603 | return nil |
| 604 | } |
| 605 | |
| 606 | // Modify adds a statement modifier for attaching custom logic to the UPDATE statement. |
| 607 | func (_u *UserUpdateOne) Modify(modifiers ...func(u *sql.UpdateBuilder)) *UserUpdateOne { |