예제 #1
0
// Validate validates the token.
func (t AccessToken) Validate() error {
	type T struct {
		AccessToken string `validate:"min=40,max=40,regexp=^[a-zA-Z0-9]+$"`
	}
	v := T{t.String()}
	return validator.Validate(v)
}
예제 #2
0
// Validate ...
func (p PaginationRequest) Validate() error {
	return validator.Validate(p)
}