Skip to content

Document list of all available rules for increased productivity #509

@PrakharSrivastav

Description

@PrakharSrivastav

Package version eg. v8, v9:

v9

Issue, Question or Enhancement:

During development, it will be extremely useful to have a list of available validation methods available at one place for reference. I understand that I can look at the package to see the available validation methods, but switching back and forth between packages is slow.

I want to request a *.md file which I can open in a browser tab and quickly reference the validation to check if rule is called min or minimum for example.

An example to refer would be https://respect-validation.readthedocs.io/en/1.1/list-of-rules/
where I can see everything quickly. I think a list of this kind would really boost developer productivity.

Code sample, to showcase or reproduce:

type RegisterRequest struct {
       // an md file will be useful to quickly see if rule is called alpha, alphanumeric or alphabet
	FirstName   string `json:"first_name" validate:"required,min=3,alpha"`
	LastName    string `json:"last_name"`
}

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions