update docs for FieldWithValue=>VarWithValue

pull/343/head v9.9.4
Dean Karn 7 years ago
parent 36cd0d5b69
commit 3620d3c069
  1. 2
      README.md
  2. 14
      doc.go

@ -1,7 +1,7 @@
Package validator Package validator
================ ================
<img align="right" src="https://raw.githubusercontent.com/go-playground/validator/v9/logo.png">[![Join the chat at https://gitter.im/go-playground/validator](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/go-playground/validator?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) <img align="right" src="https://raw.githubusercontent.com/go-playground/validator/v9/logo.png">[![Join the chat at https://gitter.im/go-playground/validator](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/go-playground/validator?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
![Project status](https://img.shields.io/badge/version-9.9.3-green.svg) ![Project status](https://img.shields.io/badge/version-9.9.4-green.svg)
[![Build Status](https://semaphoreci.com/api/v1/joeybloggs/validator/branches/v9/badge.svg)](https://semaphoreci.com/joeybloggs/validator) [![Build Status](https://semaphoreci.com/api/v1/joeybloggs/validator/branches/v9/badge.svg)](https://semaphoreci.com/joeybloggs/validator)
[![Coverage Status](https://coveralls.io/repos/go-playground/validator/badge.svg?branch=v9&service=github)](https://coveralls.io/github/go-playground/validator?branch=v9) [![Coverage Status](https://coveralls.io/repos/go-playground/validator/badge.svg?branch=v9&service=github)](https://coveralls.io/github/go-playground/validator?branch=v9)
[![Go Report Card](https://goreportcard.com/badge/github.com/go-playground/validator)](https://goreportcard.com/report/github.com/go-playground/validator) [![Go Report Card](https://goreportcard.com/badge/github.com/go-playground/validator)](https://goreportcard.com/report/github.com/go-playground/validator)

@ -94,7 +94,7 @@ used "eqcsfield" it could be multiple levels down. Example:
// NOTE: when calling validate.Struct(val) topStruct will be the top level struct passed // NOTE: when calling validate.Struct(val) topStruct will be the top level struct passed
// into the function // into the function
// when calling validate.FieldWithValue(val, field, tag) val will be // when calling validate.VarWithValue(val, field, tag) val will be
// whatever you pass, struct, field... // whatever you pass, struct, field...
// when calling validate.Field(field, tag) val will be nil // when calling validate.Field(field, tag) val will be nil
@ -369,7 +369,7 @@ Example #1:
Example #2: Example #2:
// Validating by field: // Validating by field:
validate.FieldWithValue(password, confirmpassword, "eqfield") validate.VarWithValue(password, confirmpassword, "eqfield")
Field Equals Another Field (relative) Field Equals Another Field (relative)
@ -391,7 +391,7 @@ Examples:
Usage: nefield=Color2 Usage: nefield=Color2
// Validating by field: // Validating by field:
validate.FieldWithValue(color1, color2, "nefield") validate.VarWithValue(color1, color2, "nefield")
Field Does Not Equal Another Field (relative) Field Does Not Equal Another Field (relative)
@ -414,7 +414,7 @@ Example #1:
Example #2: Example #2:
// Validating by field: // Validating by field:
validate.FieldWithValue(start, end, "gtfield") validate.VarWithValue(start, end, "gtfield")
Field Greater Than Another Relative Field Field Greater Than Another Relative Field
@ -438,7 +438,7 @@ Example #1:
Example #2: Example #2:
// Validating by field: // Validating by field:
validate.FieldWithValue(start, end, "gtefield") validate.VarWithValue(start, end, "gtefield")
Field Greater Than or Equal To Another Relative Field Field Greater Than or Equal To Another Relative Field
@ -461,7 +461,7 @@ Example #1:
Example #2: Example #2:
// Validating by field: // Validating by field:
validate.FieldWithValue(start, end, "ltfield") validate.VarWithValue(start, end, "ltfield")
Less Than Another Relative Field Less Than Another Relative Field
@ -484,7 +484,7 @@ Example #1:
Example #2: Example #2:
// Validating by field: // Validating by field:
validate.FieldWithValue(start, end, "ltefield") validate.VarWithValue(start, end, "ltefield")
Less Than or Equal To Another Relative Field Less Than or Equal To Another Relative Field

Loading…
Cancel
Save