entc/gen: improve validator-check error for gotype (#970)

This commit is contained in:
Ariel Mashraki
2020-11-21 17:07:54 +02:00
committed by GitHub
parent fe47093c55
commit 68f40030a6

View File

@@ -707,7 +707,7 @@ func (t *Type) checkField(tf *Field, f *load.Field) (err error) {
f.Info.Ident = fmt.Sprintf("%s.%s", t.Package(), pascal(f.Name))
}
case tf.Validators > 0 && !tf.ConvertedToBasic():
err = fmt.Errorf("GoType %q for field %q must be converted to basic Go type for validators", tf.Type, f.Name)
err = fmt.Errorf("GoType %q for field %q must be converted to the basic %q type for validators", tf.Type, f.Name, tf.Type.Type)
}
return err
}