translations.go raw

   1  package validator
   2  
   3  import ut "github.com/go-playground/universal-translator"
   4  
   5  // TranslationFunc is the function type used to register or override
   6  // custom translations
   7  type TranslationFunc func(ut ut.Translator, fe FieldError) string
   8  
   9  // RegisterTranslationsFunc allows for registering of translations
  10  // for a 'ut.Translator' for use within the 'TranslationFunc'
  11  type RegisterTranslationsFunc func(ut ut.Translator) error
  12