MCPcopy Index your code
hub / github.com/labstack/echo / Validate

Method Validate

context.go:484–489  ·  view source on GitHub ↗

Validate validates provided `i`. It is usually called after `Context#Bind()`. Validator must be registered using `Echo#Validator`.

(i any)

Source from the content-addressed store, hash-verified

482// Validate validates provided `i`. It is usually called after `Context#Bind()`.
483// Validator must be registered using `Echo#Validator`.
484func (c *Context) Validate(i any) error {
485 if c.echo.Validator == nil {
486 return ErrValidatorNotRegistered
487 }
488 return c.echo.Validator.Validate(i)
489}
490
491// Render renders a template with data and sends a text/html response with status
492// code. Renderer must be registered using `Echo.Renderer`.

Callers 1

TestContext_ValidateFunction · 0.95

Calls 1

ValidateMethod · 0.65

Tested by 1

TestContext_ValidateFunction · 0.76