Repository: go-playground/validator
File: doc.go (Go)

Code before:

	map[[2]string]string with validation tag "gt=0,dive,keys,dive,eq=1|eq=2,endkeys,required"
	// gt=0 will be applied to the map itself
	// eq=1|eq=2 will be applied to each array element in the map keys
	// required will be applied to map values

# Required

This validates that the value is not the data types default zero value.
For numbers ensures value is not zero. For strings ensures value is
not "". For booleans ensures value is not false. For slices, maps, pointers, interfaces, channels and functions
ensures the value is not nil. For structs ensures value is not the zero value when using WithRequiredStructEnabled.

	Usage: required

# Required If

The field under validation must be present and not empty only if all
the other specified fields are equal to the value following the specified
field. For strings ensures value is not "". For slices, maps, pointers,
interfaces, channels and functions ensures the value is not nil. For structs ensures value is not the zero value.

	Usage: required_if

NOTE: Duplicate field names in the parameters will cause a panic error.

Examples:

	// require the field if the Field1 is equal to the parameter given:
	Usage: required_if=Field1 foobar

	// require the field if the Field1 and Field2 is equal to the value respectively:
	Usage: required_if=Field1 foo Field2 bar

	// INVALID: duplicate field names will cause a panic error:
	Usage: required_if=Field1 foo Field1 bar

# Required Unless

The field under validation must be present and not empty unless all
the other specified fields are equal to the value following the specified
field. For strings ensures value is not "". For slices, maps, pointers,
interfaces, channels and functions ensures the value is not nil. For structs ensures value is not the zero value.

	Usage: required_unless

Examples:

	// require the field unless the Field1 is equal to the parameter given:
	Usage: required_unless=Field1 foobar


Review comment (suggestion):
```suggestion
Using the same field name multiple times in the parameters will result in a panic at runtime.

	Usage: required_if

Examples:
```

Code after:

	map[[2]string]string with validation tag "gt=0,dive,keys,dive,eq=1|eq=2,endkeys,required"
	// gt=0 will be applied to the map itself
	// eq=1|eq=2 will be applied to each array element in the map keys
	// required will be applied to map values

# Required

This validates that the value is not the data types default zero value.
For numbers ensures value is not zero. For strings ensures value is
not "". For booleans ensures value is not false. For slices, maps, pointers, interfaces, channels and functions
ensures the value is not nil. For structs ensures value is not the zero value when using WithRequiredStructEnabled.

	Usage: required

# Required If

The field under validation must be present and not empty only if all
the other specified fields are equal to the value following the specified
field. For strings ensures value is not "". For slices, maps, pointers,
interfaces, channels and functions ensures the value is not nil. For structs ensures value is not the zero value.
Using the same field name multiple times in the parameters will result in a panic at runtime.

	Usage: required_if

Examples:

	// require the field if the Field1 is equal to the parameter given:
	Usage: required_if=Field1 foobar

	// require the field if the Field1 and Field2 is equal to the value respectively:
	Usage: required_if=Field1 foo Field2 bar

# Required Unless

The field under validation must be present and not empty unless all
the other specified fields are equal to the value following the specified
field. For strings ensures value is not "". For slices, maps, pointers,
interfaces, channels and functions ensures the value is not nil. For structs ensures value is not the zero value.

	Usage: required_unless

Examples:

	// require the field unless the Field1 is equal to the parameter given:
	Usage: required_unless=Field1 foobar

	// require the field unless the Field1 and Field2 is equal to the value respectively:
	Usage: required_unless=Field1 foo Field2 bar

# Required With