github.com/lufia/go-validator (go): Package validator enables strongly-typed Validate methods to validate any types.  There are builtin validators.  When these builtin validators detects the value is invalid, they returns just an error corresponding to the validator. In other words, they don't return multiple errors wrapped by errors.Join.  Also there are few composition validators.  These validators wraps multiple validators (including composition validators itself), so it could be contained multiple errors to a returned error from them.  To get the details:  The New utility function makes it easy to implement custom validators.  We highly recommend to set custom error message with WithFormat to that validator. It also has default error message but it might be a unsufficient to your users.  The builtin- and compositon-validators has default error messages. Additionally these validators provides to modify its each default message to appropriate message on the situation.  For example:  It is different for each the validator to be available argument names with ByName. See each the validator documentation.  The validators error messages are available in multiple languages.  The validator package assumes English is default language. To switch default language to another one, it is set Printer provided by golang.org/x/text/message to ctx that will be passed to the first argument of Validate[T] method.
Keywords: go|validation|validator