From 7b0bf9d3b4d512060405bcfb3de6da626ce6740b Mon Sep 17 00:00:00 2001 From: tomjamtin <61030761+tomjamtin@users.noreply.github.com> Date: Sat, 20 Nov 2021 16:09:07 +1100 Subject: [PATCH] Update guide.md Added the curl command: curl -X POST http://localhost:1323/users \ -H 'Content-Type: application/json' \ -d '{"name":"Joe","email":"joe@invalid-domain"}' {"message":"Key: 'User.Email' Error:Field validation for 'Email' failed on the 'email' tag"} --- website/content/guide.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/website/content/guide.md b/website/content/guide.md index 013514ce..6dc2b9c7 100644 --- a/website/content/guide.md +++ b/website/content/guide.md @@ -204,6 +204,14 @@ e.POST("/users", func(c echo.Context) error { }) ``` +Run the following command. +```sh +$ curl -X POST http://localhost:1323/users \ + -H 'Content-Type: application/json' \ + -d '{"name":"Joe","email":"joe@invalid-domain"}' +{"message":"Key: 'User.Email' Error:Field validation for 'Email' failed on the 'email' tag"} +``` + ### Static Content Serve any file from static directory for path `/static/*`.