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 example of parameterization checks using closures #73

Closed LindseyB closed 5 years ago

LindseyB commented 5 years ago

I recognize this is a relatively straight forward usage of closures, but I always find it useful to have examples. Theoretically this can close https://github.com/go-ozzo/ozzo-validation/issues/64 as it pulls out the discussion into documentation.

LindseyB commented 5 years ago

Closing since it's already documented now.

coveralls commented 5 years ago

Coverage Status

Coverage remained the same at 99.848% when pulling ad41b5ac1efd5fd6552bb387d565b192fd35f19c on LindseyB:patch-1 into 2882aa089b427b06d7930d82b8136e7281c0629b on go-ozzo:master.

qiangxue commented 5 years ago

oops, I didn't notice you made this before I committed mine. Thanks for your contribution!