validator/translations.go

12 lines
425 B
Go
Raw Permalink Normal View History

2016-09-14 14:48:46 -04:00
package validator
import ut "github.com/go-playground/universal-translator"
2016-09-14 14:48:46 -04:00
// TranslationFunc is the function type used to register or override
// custom translations
type TranslationFunc func(ut ut.Translator, fe FieldError) string
// RegisterTranslationsFunc allows for registering of translations
2018-05-05 09:23:38 -07:00
// for a 'ut.Translator' for use within the 'TranslationFunc'
2016-09-14 14:48:46 -04:00
type RegisterTranslationsFunc func(ut ut.Translator) error