Standard validation messages include the value of the validated field, but when you use a custom validation message, this data is lost.
Could we have a way of including the data from the validated field. Maybe by including %s or %v. In the example below, cust_uuid_func is a custom validation function:
type Example struct {
UUIDField string `valid:"uuidv4,cust_uuid_func~UUIDField: uuid %s not found,required"`
}
Hello guys!
I forked this package cause owner disappeared. Hope, he will be back, but it would be easier to merge these changes back if he is back
Link to my repo: create issue there and we'll discuss it.
Standard validation messages include the value of the validated field, but when you use a custom validation message, this data is lost.
Could we have a way of including the data from the validated field. Maybe by including
%s
or%v
. In the example below,cust_uuid_func
is a custom validation function: