check runs all checks and user-defined validators on the builder.
()
| 217 | |
| 218 | // check runs all checks and user-defined validators on the builder. |
| 219 | func (_c *AllowListItemCreate) check() error { |
| 220 | if _, ok := _c.mutation.CreatedAt(); !ok { |
| 221 | return &ValidationError{Name: "created_at", err: errors.New(`ent: missing required field "AllowListItem.created_at"`)} |
| 222 | } |
| 223 | if _, ok := _c.mutation.UpdatedAt(); !ok { |
| 224 | return &ValidationError{Name: "updated_at", err: errors.New(`ent: missing required field "AllowListItem.updated_at"`)} |
| 225 | } |
| 226 | if _, ok := _c.mutation.Value(); !ok { |
| 227 | return &ValidationError{Name: "value", err: errors.New(`ent: missing required field "AllowListItem.value"`)} |
| 228 | } |
| 229 | return nil |
| 230 | } |
| 231 | |
| 232 | func (_c *AllowListItemCreate) sqlSave(ctx context.Context) (*AllowListItem, error) { |
| 233 | if err := _c.check(); err != nil { |