rename to v2
This commit is contained in:
@@ -7,18 +7,18 @@ validation is a form validation for a data validation and error collecting using
|
||||
|
||||
Install:
|
||||
|
||||
go get github.com/beego/beego/validation
|
||||
go get github.com/beego/beego/v2/validation
|
||||
|
||||
Test:
|
||||
|
||||
go test github.com/beego/beego/validation
|
||||
go test github.com/beego/beego/v2/validation
|
||||
|
||||
## Example
|
||||
|
||||
Direct Use:
|
||||
|
||||
import (
|
||||
"github.com/beego/beego/validation"
|
||||
"github.com/beego/beego/v2/validation"
|
||||
"log"
|
||||
)
|
||||
|
||||
@@ -49,7 +49,7 @@ Direct Use:
|
||||
Struct Tag Use:
|
||||
|
||||
import (
|
||||
"github.com/beego/beego/validation"
|
||||
"github.com/beego/beego/v2/validation"
|
||||
)
|
||||
|
||||
// validation function follow with "valid" tag
|
||||
@@ -81,7 +81,7 @@ Struct Tag Use:
|
||||
Use custom function:
|
||||
|
||||
import (
|
||||
"github.com/beego/beego/validation"
|
||||
"github.com/beego/beego/v2/validation"
|
||||
)
|
||||
|
||||
type user struct {
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
// Package validation for validations
|
||||
//
|
||||
// import (
|
||||
// "github.com/beego/beego/validation"
|
||||
// "github.com/beego/beego/v2/validation"
|
||||
// "log"
|
||||
// )
|
||||
//
|
||||
|
||||
@@ -23,7 +23,7 @@ import (
|
||||
"time"
|
||||
"unicode/utf8"
|
||||
|
||||
"github.com/beego/beego/core/logs"
|
||||
"github.com/beego/beego/v2/core/logs"
|
||||
)
|
||||
|
||||
// CanSkipFuncs will skip valid if RequiredFirst is true and the struct field's value is empty
|
||||
|
||||
Reference in New Issue
Block a user