Skip to content

docs: update v1.18 documentation#192

Open
goravel-coder wants to merge 4 commits into
masterfrom
bowen/v1.18
Open

docs: update v1.18 documentation#192
goravel-coder wants to merge 4 commits into
masterfrom
bowen/v1.18

Conversation

@goravel-coder

Copy link
Copy Markdown

Summary

  • Documents the v1.18 upgrade path and feature introductions for validation, collections, maintenance mode, build generation, ORM query context, package import aliases, and console tables.
  • Adds user-facing guidance for JWT guard mismatch handling and multiple-guard token parsing.
  • Adds sidebar entries so the new collections and v1.18 upgrade docs are discoverable.

Why

These docs align the English site with the v1.18 framework changes and give users one place to understand migration requirements and new APIs.

The validation examples show the new map[string]any rule format and string-slice rule values for regex patterns that contain pipes.

validator, err := ctx.Request().Validate(map[string]any{
	"title": "required|string|max:255",
	"slug":  []string{"required", "regex:^(news|docs)-[a-z]+$", "string"},
})
if err != nil {
	return ctx.Response().Json(http.StatusBadRequest, http.Json{"message": err.Error()})
}
if validator.Fails() {
	return ctx.Response().Json(http.StatusBadRequest, http.Json{"message": validator.Errors().All()})
}
validated := validator.Validated()
return ctx.Response().Success().Json(http.Json{"post": validated})

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants