// check runs all checks and user-defined validators on the builder.
check runs all checks and user-defined validators on the builder.
// check runs all checks and user - defined validators on the builder .
func (ftc *FactTypeCreate) check() error {
	if _, ok := ftc.mutation.CreatedAt(); !ok {
		return &ValidationError{Name: "created_at", err: errors.New("ent: missing required field \"created_at\"")}
	}
	if _, ok := ftc.mutation.UpdatedAt(); !ok {
		return &ValidationError{Name: "updated_at", err: errors.New("ent: missing required field \"updated_at\"")}
	}
	if _, ok := ftc.mutation.Slug(); !ok {
		return &ValidationError{Name: "slug", err: errors.New("ent: missing required field \"slug\"")}
	}
	if _, ok := ftc.mutation.BuiltIn(); !ok {
		return &ValidationError{Name: "built_in", err: errors.New("ent: missing required field \"built_in\"")}
	}
	if v, ok := ftc.mutation.ID(); ok {
		if err := facttype.IDValidator(v); err != nil {
			return &ValidationError{Name: "id", err: fmt.Errorf("ent: validator failed for field \"id\": %w", err)}
		}
	}
	return nil
}
func ( ftc * FactTypeCreate ) check ( ) error { if _ , ok := ftc . mutation . CreatedAt ( ) ; ! ok { return & ValidationError { Name : " " , err : errors . New ( " \" \" " ) } } if _ , ok := ftc . mutation . UpdatedAt ( ) ; ! ok { return & ValidationError { Name : " " , err : errors . New ( " \" \" " ) } } if _ , ok := ftc . mutation . Slug ( ) ; ! ok { return & ValidationError { Name : " " , err : errors . New ( " \" \" " ) } } if _ , ok := ftc . mutation . BuiltIn ( ) ; ! ok { return & ValidationError { Name : " " , err : errors . New ( " \" \" " ) } } if v , ok := ftc . mutation . ID ( ) ; ok { if err := facttype . IDValidator ( v ) ; err != nil { return & ValidationError { Name : " " , err : fmt . Errorf ( " \" \" " , err ) } } } return nil }
check runs all checks and user-defined validators on the builder.
check runs all checks and user - defined validators on the builder .