1
0
mirror of https://github.com/kataras/iris.git synced 2025-12-22 04:17:03 +00:00

add 'app.Validator' field for ReadJSON, ReadXML, ReadMsgPack, ReadYAML, ReadForm, ReadQuery data validation, defaults to empty but can be set-ed to 3rd-party packages

Former-commit-id: e42d9be5928edcdaad4579c008f741b1a7d97da9
This commit is contained in:
Gerasimos (Makis) Maropoulos
2020-04-09 19:02:08 +03:00
parent 1b02f048ef
commit ad154ea479
6 changed files with 166 additions and 112 deletions

View File

@@ -20,6 +20,10 @@ type Application interface {
// I18nReadOnly returns the i18n's read-only features.
I18nReadOnly() I18nReadOnly
// Validate validates a value and returns nil if passed or
// the failure reason if not.
Validate(interface{}) error
// View executes and write the result of a template file to the writer.
//
// Use context.View to render templates to the client instead.