go-ozzo / ozzo-validation

An idiomatic Go (golang) validation package. Supports configurable and extensible validation rules (validators) using normal language constructs instead of error-prone struct tags.
MIT License
3.73k stars 224 forks source link

Validating int types #161

Open Dilbar97 opened 2 years ago

Dilbar97 commented 2 years ago

is it possible to check the number for more than zero?

yagikota commented 1 year ago

@Dilbar97 You can use validation.Min(0).Exclusive().

https://github.com/go-ozzo/ozzo-validation/blob/master/minmax.go#L39