Skip to content

Custom Messages

This content is for v0.7. Switch to the latest version for up-to-date documentation.

Most rules accept an optional template argument.

val := v.Is(
v.String("", "address_field", "Address").
Not().
Empty("{{title}} must not be empty. Please provide the value in the input {{name}}."),
)