Hi ,
In the struct usage example , you use the endpoints:"req"`
that suppose to be a mandatory field ?
I tried to pass an empty value to a field with the endpoints:req tag and i didn't get any error
What will be the best way to valid mandatory fields ?
i can do something like that but it must be a nicer solution
if len(subscriptionToken) == 0 {
return endpoints.NewAPIError("subscriptionToken is empty", "subscriptionToken is empty", 400)
}
Hi , In the struct usage example , you use the endpoints:"req"` that suppose to be a mandatory field ? I tried to pass an empty value to a field with the endpoints:req tag and i didn't get any error What will be the best way to valid mandatory fields ?
i can do something like that but it must be a nicer solution