Merge pull request #31 from muyiwaolurin/v5-development

Minor typos
pull/33/head
Dean Karn 10 years ago
commit d400cda52e
  1. 20
      README.md
  2. 28
      doc.go

@ -4,12 +4,12 @@ Package validator
[![GoDoc](https://godoc.org/gopkg.in/bluesuncorp/validator.v5?status.svg)](https://godoc.org/gopkg.in/bluesuncorp/validator.v5) [![GoDoc](https://godoc.org/gopkg.in/bluesuncorp/validator.v5?status.svg)](https://godoc.org/gopkg.in/bluesuncorp/validator.v5)
Package validator implements value validations for structs and individual fields based on tags. Package validator implements value validations for structs and individual fields based on tags.
It is even capable of Cross Field and even Cross Field Cross Struct validation. It is also capable of Cross Field and Cross Struct validations.
Installation Installation
============ ============
Just use go get. Use go get.
go get gopkg.in/bluesuncorp/validator.v5 go get gopkg.in/bluesuncorp/validator.v5
@ -17,22 +17,22 @@ or to update
go get -u gopkg.in/bluesuncorp/validator.v5 go get -u gopkg.in/bluesuncorp/validator.v5
And then just import the package into your own code. Then import the validator package into your own code.
import "gopkg.in/bluesuncorp/validator.v5" import "gopkg.in/bluesuncorp/validator.v5"
Usage Usage and documentation
===== =======================
Please see http://godoc.org/gopkg.in/bluesuncorp/validator.v5 for detailed usage docs. Please see http://godoc.org/gopkg.in/bluesuncorp/validator.v5 for detailed usage docs.
Contributing How to Contribute
============ =================
There will be a development branch for each version of this package i.e. v1-development, please There will be always be a development branch for each version i.e. `v1-development`. In order to contribute,
make your pull requests against those branches. please make your pull requests against those branches.
If changes are breaking please create an issue, for discussion and create a pull request against If changes made fails the test or are broken, please create an issue, for discussion and create a pull request against
the highest development branch for example this package has a v1 and v1-development branch the highest development branch for example this package has a v1 and v1-development branch
however, there will also be a v2-development brach even though v2 doesn't exist yet. however, there will also be a v2-development brach even though v2 doesn't exist yet.

@ -1,5 +1,5 @@
/* /*
Package validator implements value validations for structs and individual fields based on tags. It can also handle Cross Field validation and even Cross Field Cross Struct validation for nested structs. Package validator implements value validations for structs and individual fields based on tags. It can also handle Cross Field and Cross Struct validation for nested structs.
Validate Validate
@ -250,55 +250,55 @@ Here is a list of the current built in validators:
Validating by field validate.FieldWithValue(start, end, "ltefield") Validating by field validate.FieldWithValue(start, end, "ltefield")
alpha alpha
This validates that a strings value contains alpha characters only This validates that a string value contains alpha characters only
(Usage: alpha) (Usage: alpha)
alphanum alphanum
This validates that a strings value contains alphanumeric characters only This validates that a string value contains alphanumeric characters only
(Usage: alphanum) (Usage: alphanum)
numeric numeric
This validates that a strings value contains a basic numeric value. This validates that a string value contains a basic numeric value.
basic excludes exponents etc... basic excludes exponents etc...
(Usage: numeric) (Usage: numeric)
hexadecimal hexadecimal
This validates that a strings value contains a valid hexadecimal. This validates that a string value contains a valid hexadecimal.
(Usage: hexadecimal) (Usage: hexadecimal)
hexcolor hexcolor
This validates that a strings value contains a valid hex color including This validates that a string value contains a valid hex color including
hashtag (#) hashtag (#)
(Usage: hexcolor) (Usage: hexcolor)
rgb rgb
This validates that a strings value contains a valid rgb color This validates that a string value contains a valid rgb color
(Usage: rgb) (Usage: rgb)
rgba rgba
This validates that a strings value contains a valid rgba color This validates that a string value contains a valid rgba color
(Usage: rgba) (Usage: rgba)
hsl hsl
This validates that a strings value contains a valid hsl color This validates that a string value contains a valid hsl color
(Usage: hsl) (Usage: hsl)
hsla hsla
This validates that a strings value contains a valid hsla color This validates that a string value contains a valid hsla color
(Usage: hsla) (Usage: hsla)
email email
This validates that a strings value contains a valid email This validates that a string value contains a valid email
This may not conform to all possibilities of any rfc standard, but neither This may not conform to all possibilities of any rfc standard, but neither
does any email provider accept all posibilities... does any email provider accept all posibilities...
(Usage: email) (Usage: email)
url url
This validates that a strings value contains a valid url This validates that a string value contains a valid url
This will accept any url the golang request uri accepts but must contain This will accept any url the golang request uri accepts but must contain
a schema for example http:// or rtmp:// a schema for example http:// or rtmp://
(Usage: url) (Usage: url)
uri uri
This validates that a strings value contains a valid uri This validates that a string value contains a valid uri
This will accept any uri the golang request uri accepts (Usage: uri) This will accept any uri the golang request uri accepts (Usage: uri)
Validator notes: Validator notes:
@ -314,7 +314,7 @@ Validator notes:
used within the validator function and even be precompiled for better efficiency used within the validator function and even be precompiled for better efficiency
within regexes.go. within regexes.go.
And the best reason, you can sumit a pull request and we can keep on adding to the And the best reason, you can submit a pull request and we can keep on adding to the
validation library of this package! validation library of this package!
Panics Panics

Loading…
Cancel
Save