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

Add range rule implementation and tests #8

Closed sgleizes closed 8 years ago

sgleizes commented 8 years ago

The Range rule is used to validate that numeric values are within a given range.

This simple implementation supports int, uint and float types and indirects initial value to support for pointers, interfaces, ...

coveralls commented 8 years ago

Coverage Status

Coverage decreased (-1.5%) to 98.507% when pulling 8f7ce370a3aa22eb17fd625840c224e48c930fc1 on sgleizes:feature/add-range-rule into c5ea90fdc3a21aeec875ed51605cada9a9be2b26 on go-ozzo:master.

coveralls commented 8 years ago

Coverage Status

Coverage remained the same at 100.0% when pulling a70fb0055d60cdd84633bbd07b632e32aab50b93 on sgleizes:feature/add-range-rule into c5ea90fdc3a21aeec875ed51605cada9a9be2b26 on go-ozzo:master.

qiangxue commented 8 years ago

Everything looks great to me, except the license header in range_test.go. Could you please fix that? Thanks!

sgleizes commented 8 years ago

Sorry about that. Bad habit.

qiangxue commented 8 years ago

Thank you very much!