version 2

This commit is contained in:
John Guo
2021-10-11 21:41:56 +08:00
parent bea54b445e
commit 1bc0635f8b
1053 changed files with 2892 additions and 2892 deletions

View File

@ -12,7 +12,7 @@ import (
"regexp"
"strings"
"github.com/gogf/gf/text/gregex"
"github.com/gogf/gf/v2/text/gregex"
)
// Refer to Laravel validation:

View File

@ -7,10 +7,10 @@
package gvalid
import (
"github.com/gogf/gf/errors/gcode"
"github.com/gogf/gf/errors/gerror"
"github.com/gogf/gf/text/gregex"
"github.com/gogf/gf/text/gstr"
"github.com/gogf/gf/v2/errors/gcode"
"github.com/gogf/gf/v2/errors/gerror"
"github.com/gogf/gf/v2/text/gregex"
"github.com/gogf/gf/v2/text/gstr"
"strings"
)

View File

@ -7,7 +7,7 @@
package gvalid
import (
"github.com/gogf/gf/i18n/gi18n"
"github.com/gogf/gf/v2/i18n/gi18n"
)
// Validator is the validation manager for chaining operations.

View File

@ -8,8 +8,8 @@ package gvalid
import (
"context"
"github.com/gogf/gf/errors/gcode"
"github.com/gogf/gf/util/gconv"
"github.com/gogf/gf/v2/errors/gcode"
"github.com/gogf/gf/v2/util/gconv"
"strings"
)

View File

@ -8,10 +8,10 @@ package gvalid
import (
"context"
"github.com/gogf/gf/errors/gcode"
"github.com/gogf/gf/internal/structs"
"github.com/gogf/gf/util/gconv"
"github.com/gogf/gf/util/gutil"
"github.com/gogf/gf/v2/errors/gcode"
"github.com/gogf/gf/v2/internal/structs"
"github.com/gogf/gf/v2/util/gconv"
"github.com/gogf/gf/v2/util/gutil"
"strings"
)

View File

@ -8,20 +8,20 @@ package gvalid
import (
"context"
"github.com/gogf/gf/errors/gcode"
"github.com/gogf/gf/errors/gerror"
"github.com/gogf/gf/text/gstr"
"github.com/gogf/gf/v2/errors/gcode"
"github.com/gogf/gf/v2/errors/gerror"
"github.com/gogf/gf/v2/text/gstr"
"strconv"
"strings"
"time"
"github.com/gogf/gf/internal/json"
"github.com/gogf/gf/net/gipv4"
"github.com/gogf/gf/net/gipv6"
"github.com/gogf/gf/os/gtime"
"github.com/gogf/gf/text/gregex"
"github.com/gogf/gf/util/gconv"
"github.com/gogf/gf/util/gutil"
"github.com/gogf/gf/v2/internal/json"
"github.com/gogf/gf/v2/net/gipv4"
"github.com/gogf/gf/v2/net/gipv6"
"github.com/gogf/gf/v2/os/gtime"
"github.com/gogf/gf/v2/text/gregex"
"github.com/gogf/gf/v2/util/gconv"
"github.com/gogf/gf/v2/util/gutil"
)
type iTime interface {

View File

@ -8,7 +8,7 @@ package gvalid
import (
"context"
"github.com/gogf/gf/util/gconv"
"github.com/gogf/gf/v2/util/gconv"
"strconv"
"strings"
)

View File

@ -7,9 +7,9 @@
package gvalid
import (
"github.com/gogf/gf/internal/empty"
"github.com/gogf/gf/util/gconv"
"github.com/gogf/gf/util/gutil"
"github.com/gogf/gf/v2/internal/empty"
"github.com/gogf/gf/v2/util/gconv"
"github.com/gogf/gf/v2/util/gutil"
"reflect"
"strings"
)

View File

@ -7,7 +7,7 @@
package gvalid
import (
"github.com/gogf/gf/text/gregex"
"github.com/gogf/gf/v2/text/gregex"
"strconv"
"strings"
)

View File

@ -10,14 +10,14 @@ import (
"context"
"errors"
"fmt"
"github.com/gogf/gf/os/gctx"
"github.com/gogf/gf/v2/os/gctx"
"math"
"reflect"
"github.com/gogf/gf/container/gvar"
"github.com/gogf/gf/frame/g"
"github.com/gogf/gf/util/gconv"
"github.com/gogf/gf/util/gvalid"
"github.com/gogf/gf/v2/container/gvar"
"github.com/gogf/gf/v2/frame/g"
"github.com/gogf/gf/v2/util/gconv"
"github.com/gogf/gf/v2/util/gvalid"
)
func ExampleCheckMap() {

View File

@ -8,16 +8,16 @@ package gvalid_test
import (
"context"
"github.com/gogf/gf/errors/gcode"
"github.com/gogf/gf/errors/gerror"
"github.com/gogf/gf/os/gctx"
"github.com/gogf/gf/os/gtime"
"github.com/gogf/gf/v2/errors/gcode"
"github.com/gogf/gf/v2/errors/gerror"
"github.com/gogf/gf/v2/os/gctx"
"github.com/gogf/gf/v2/os/gtime"
"testing"
"time"
"github.com/gogf/gf/frame/g"
"github.com/gogf/gf/test/gtest"
"github.com/gogf/gf/util/gvalid"
"github.com/gogf/gf/v2/frame/g"
"github.com/gogf/gf/v2/test/gtest"
"github.com/gogf/gf/v2/util/gvalid"
)
var (

View File

@ -8,12 +8,12 @@ package gvalid_test
import (
"context"
"github.com/gogf/gf/errors/gerror"
"github.com/gogf/gf/frame/g"
"github.com/gogf/gf/v2/errors/gerror"
"github.com/gogf/gf/v2/frame/g"
"testing"
"github.com/gogf/gf/test/gtest"
"github.com/gogf/gf/util/gvalid"
"github.com/gogf/gf/v2/test/gtest"
"github.com/gogf/gf/v2/util/gvalid"
)
func Test_CheckMap1(t *testing.T) {

View File

@ -8,14 +8,14 @@ package gvalid_test
import (
"context"
"github.com/gogf/gf/container/gvar"
"github.com/gogf/gf/os/gtime"
"github.com/gogf/gf/v2/container/gvar"
"github.com/gogf/gf/v2/os/gtime"
"testing"
"github.com/gogf/gf/frame/g"
"github.com/gogf/gf/v2/frame/g"
"github.com/gogf/gf/test/gtest"
"github.com/gogf/gf/util/gvalid"
"github.com/gogf/gf/v2/test/gtest"
"github.com/gogf/gf/v2/util/gvalid"
)
func Test_CheckStruct(t *testing.T) {

View File

@ -11,11 +11,11 @@ import (
"errors"
"testing"
"github.com/gogf/gf/frame/g"
"github.com/gogf/gf/util/gconv"
"github.com/gogf/gf/v2/frame/g"
"github.com/gogf/gf/v2/util/gconv"
"github.com/gogf/gf/test/gtest"
"github.com/gogf/gf/util/gvalid"
"github.com/gogf/gf/v2/test/gtest"
"github.com/gogf/gf/v2/util/gvalid"
)
func Test_CustomRule1(t *testing.T) {

View File

@ -11,8 +11,8 @@ import (
"strings"
"testing"
"github.com/gogf/gf/test/gtest"
"github.com/gogf/gf/util/gvalid"
"github.com/gogf/gf/v2/test/gtest"
"github.com/gogf/gf/v2/util/gvalid"
)
func Test_Map(t *testing.T) {

View File

@ -8,12 +8,12 @@ package gvalid_test
import (
"context"
"github.com/gogf/gf/debug/gdebug"
"github.com/gogf/gf/i18n/gi18n"
"github.com/gogf/gf/util/gvalid"
"github.com/gogf/gf/v2/debug/gdebug"
"github.com/gogf/gf/v2/i18n/gi18n"
"github.com/gogf/gf/v2/util/gvalid"
"testing"
"github.com/gogf/gf/test/gtest"
"github.com/gogf/gf/v2/test/gtest"
)
func TestValidator_I18n(t *testing.T) {

View File

@ -9,7 +9,7 @@ package gvalid
import (
"testing"
"github.com/gogf/gf/test/gtest"
"github.com/gogf/gf/v2/test/gtest"
)
func Test_parseSequenceTag(t *testing.T) {