This commit is contained in:
John Guo
2025-04-10 14:12:35 +08:00
parent 1534abdb05
commit 2cc4835c49
1311 changed files with 4587 additions and 4587 deletions

View File

@ -13,9 +13,9 @@ import (
"regexp"
"strings"
"github.com/gogf/gf/v2/internal/intlog"
"github.com/gogf/gf/v2/text/gregex"
"github.com/gogf/gf/v2/util/gtag"
"github.com/gogf/gf/v3/internal/intlog"
"github.com/gogf/gf/v3/text/gregex"
"github.com/gogf/gf/v3/util/gtag"
)
// CustomMsg is the custom error message type,

View File

@ -9,10 +9,10 @@ package gvalid
import (
"strings"
"github.com/gogf/gf/v2/container/gset"
"github.com/gogf/gf/v2/errors/gcode"
"github.com/gogf/gf/v2/errors/gerror"
"github.com/gogf/gf/v2/text/gstr"
"github.com/gogf/gf/v3/container/gset"
"github.com/gogf/gf/v3/errors/gcode"
"github.com/gogf/gf/v3/errors/gerror"
"github.com/gogf/gf/v3/text/gstr"
)
// Error is the validation error for validation result.

View File

@ -12,8 +12,8 @@ import (
"reflect"
"runtime"
"github.com/gogf/gf/v2/container/gvar"
"github.com/gogf/gf/v2/internal/intlog"
"github.com/gogf/gf/v3/container/gvar"
"github.com/gogf/gf/v3/internal/intlog"
)
// RuleFunc is the custom function for data validation.

View File

@ -11,11 +11,11 @@ import (
"errors"
"reflect"
"github.com/gogf/gf/v2/i18n/gi18n"
"github.com/gogf/gf/v2/internal/reflection"
"github.com/gogf/gf/v2/internal/utils"
"github.com/gogf/gf/v2/text/gstr"
"github.com/gogf/gf/v2/util/gconv"
"github.com/gogf/gf/v3/i18n/gi18n"
"github.com/gogf/gf/v3/internal/reflection"
"github.com/gogf/gf/v3/internal/utils"
"github.com/gogf/gf/v3/text/gstr"
"github.com/gogf/gf/v3/util/gconv"
)
// Validator is the validation manager for chaining operations.

View File

@ -12,9 +12,9 @@ import (
"reflect"
"strings"
"github.com/gogf/gf/v2/errors/gcode"
"github.com/gogf/gf/v2/internal/reflection"
"github.com/gogf/gf/v2/util/gconv"
"github.com/gogf/gf/v3/errors/gcode"
"github.com/gogf/gf/v3/internal/reflection"
"github.com/gogf/gf/v3/util/gconv"
)
func (v *Validator) doCheckMap(ctx context.Context, params interface{}) Error {

View File

@ -11,12 +11,12 @@ import (
"reflect"
"strings"
"github.com/gogf/gf/v2/errors/gcode"
"github.com/gogf/gf/v2/internal/empty"
"github.com/gogf/gf/v2/os/gstructs"
"github.com/gogf/gf/v2/util/gconv"
"github.com/gogf/gf/v2/util/gmeta"
"github.com/gogf/gf/v2/util/gutil"
"github.com/gogf/gf/v3/errors/gcode"
"github.com/gogf/gf/v3/internal/empty"
"github.com/gogf/gf/v3/os/gstructs"
"github.com/gogf/gf/v3/util/gconv"
"github.com/gogf/gf/v3/util/gmeta"
"github.com/gogf/gf/v3/util/gutil"
)
func (v *Validator) doCheckStruct(ctx context.Context, object interface{}) Error {

View File

@ -12,14 +12,14 @@ import (
"reflect"
"strings"
"github.com/gogf/gf/v2/container/gvar"
"github.com/gogf/gf/v2/encoding/gjson"
"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"
"github.com/gogf/gf/v2/util/gconv"
"github.com/gogf/gf/v2/util/gvalid/internal/builtin"
"github.com/gogf/gf/v3/container/gvar"
"github.com/gogf/gf/v3/encoding/gjson"
"github.com/gogf/gf/v3/errors/gcode"
"github.com/gogf/gf/v3/errors/gerror"
"github.com/gogf/gf/v3/text/gregex"
"github.com/gogf/gf/v3/text/gstr"
"github.com/gogf/gf/v3/util/gconv"
"github.com/gogf/gf/v3/util/gvalid/internal/builtin"
)
type doCheckValueInput struct {

View File

@ -9,7 +9,7 @@ package gvalid
import (
"context"
"github.com/gogf/gf/v2/util/gvalid/internal/builtin"
"github.com/gogf/gf/v3/util/gvalid/internal/builtin"
)
// getErrorMessageByRule retrieves and returns the error message for specified rule.

View File

@ -10,8 +10,8 @@ import (
"context"
"fmt"
"github.com/gogf/gf/v2/frame/g"
"github.com/gogf/gf/v2/text/gstr"
"github.com/gogf/gf/v3/frame/g"
"github.com/gogf/gf/v3/text/gstr"
)
func ExampleRule_Required() {

View File

@ -11,13 +11,13 @@ import (
"errors"
"fmt"
"github.com/gogf/gf/v2/container/gvar"
"github.com/gogf/gf/v2/frame/g"
"github.com/gogf/gf/v2/i18n/gi18n"
"github.com/gogf/gf/v2/os/gctx"
"github.com/gogf/gf/v2/test/gtest"
"github.com/gogf/gf/v2/util/gconv"
"github.com/gogf/gf/v2/util/gvalid"
"github.com/gogf/gf/v3/container/gvar"
"github.com/gogf/gf/v3/frame/g"
"github.com/gogf/gf/v3/i18n/gi18n"
"github.com/gogf/gf/v3/os/gctx"
"github.com/gogf/gf/v3/test/gtest"
"github.com/gogf/gf/v3/util/gconv"
"github.com/gogf/gf/v3/util/gvalid"
)
func ExampleNew() {

View File

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

View File

@ -10,11 +10,11 @@ import (
"context"
"testing"
"github.com/gogf/gf/v2/container/gvar"
"github.com/gogf/gf/v2/frame/g"
"github.com/gogf/gf/v2/os/gtime"
"github.com/gogf/gf/v2/test/gtest"
"github.com/gogf/gf/v2/util/gconv"
"github.com/gogf/gf/v3/container/gvar"
"github.com/gogf/gf/v3/frame/g"
"github.com/gogf/gf/v3/os/gtime"
"github.com/gogf/gf/v3/test/gtest"
"github.com/gogf/gf/v3/util/gconv"
)
func Test_CheckStruct(t *testing.T) {

View File

@ -9,8 +9,8 @@ package gvalid_test
import (
"testing"
"github.com/gogf/gf/v2/frame/g"
"github.com/gogf/gf/v2/test/gtest"
"github.com/gogf/gf/v3/frame/g"
"github.com/gogf/gf/v3/test/gtest"
)
func Test_CI(t *testing.T) {

View File

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

View File

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

View File

@ -10,9 +10,9 @@ import (
"context"
"testing"
"github.com/gogf/gf/v2/i18n/gi18n"
"github.com/gogf/gf/v2/test/gtest"
"github.com/gogf/gf/v2/util/gvalid"
"github.com/gogf/gf/v3/i18n/gi18n"
"github.com/gogf/gf/v3/test/gtest"
"github.com/gogf/gf/v3/util/gvalid"
)
func TestValidator_I18n(t *testing.T) {

View File

@ -10,10 +10,10 @@ import (
"context"
"testing"
"github.com/gogf/gf/v2/errors/gerror"
"github.com/gogf/gf/v2/frame/g"
"github.com/gogf/gf/v2/test/gtest"
"github.com/gogf/gf/v2/util/gvalid"
"github.com/gogf/gf/v3/errors/gerror"
"github.com/gogf/gf/v3/frame/g"
"github.com/gogf/gf/v3/test/gtest"
"github.com/gogf/gf/v3/util/gvalid"
)
type UserCreateReq struct {

View File

@ -9,8 +9,8 @@ package gvalid_test
import (
"testing"
"github.com/gogf/gf/v2/frame/g"
"github.com/gogf/gf/v2/test/gtest"
"github.com/gogf/gf/v3/frame/g"
"github.com/gogf/gf/v3/test/gtest"
)
func Test_CheckStruct_Recursive_Struct(t *testing.T) {

View File

@ -10,13 +10,13 @@ import (
"testing"
"time"
"github.com/gogf/gf/v2/errors/gcode"
"github.com/gogf/gf/v2/errors/gerror"
"github.com/gogf/gf/v2/frame/g"
"github.com/gogf/gf/v2/os/gctx"
"github.com/gogf/gf/v2/os/gtime"
"github.com/gogf/gf/v2/test/gtest"
"github.com/gogf/gf/v2/util/gtag"
"github.com/gogf/gf/v3/errors/gcode"
"github.com/gogf/gf/v3/errors/gerror"
"github.com/gogf/gf/v3/frame/g"
"github.com/gogf/gf/v3/os/gctx"
"github.com/gogf/gf/v3/os/gtime"
"github.com/gogf/gf/v3/test/gtest"
"github.com/gogf/gf/v3/util/gtag"
)
var (
@ -1590,7 +1590,7 @@ func Test_Enums(t *testing.T) {
t.AssertNil(err)
defer t.AssertNil(gtag.SetGlobalEnums(oldEnumsJson))
err = gtag.SetGlobalEnums(`{"github.com/gogf/gf/v2/util/gvalid_test.EnumsTest": ["a","b"]}`)
err = gtag.SetGlobalEnums(`{"github.com/gogf/gf/v3/util/gvalid_test.EnumsTest": ["a","b"]}`)
t.AssertNil(err)
err = g.Validator().Data(&Params{

View File

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

View File

@ -13,12 +13,12 @@ import (
"testing"
"time"
"github.com/gogf/gf/v2/errors/gerror"
"github.com/gogf/gf/v2/frame/g"
"github.com/gogf/gf/v2/net/ghttp"
"github.com/gogf/gf/v2/test/gtest"
"github.com/gogf/gf/v2/util/guid"
"github.com/gogf/gf/v2/util/gvalid"
"github.com/gogf/gf/v3/errors/gerror"
"github.com/gogf/gf/v3/frame/g"
"github.com/gogf/gf/v3/net/ghttp"
"github.com/gogf/gf/v3/test/gtest"
"github.com/gogf/gf/v3/util/guid"
"github.com/gogf/gf/v3/util/gvalid"
)
type Foo struct {

View File

@ -13,7 +13,7 @@ package builtin
import (
"reflect"
"github.com/gogf/gf/v2/container/gvar"
"github.com/gogf/gf/v3/container/gvar"
)
type Rule interface {

View File

@ -9,9 +9,9 @@ package builtin
import (
"errors"
"github.com/gogf/gf/v2/text/gstr"
"github.com/gogf/gf/v2/util/gconv"
"github.com/gogf/gf/v2/util/gutil"
"github.com/gogf/gf/v3/text/gstr"
"github.com/gogf/gf/v3/util/gconv"
"github.com/gogf/gf/v3/util/gutil"
)
// RuleAfter implements `after` rule:

View File

@ -9,9 +9,9 @@ package builtin
import (
"errors"
"github.com/gogf/gf/v2/text/gstr"
"github.com/gogf/gf/v2/util/gconv"
"github.com/gogf/gf/v2/util/gutil"
"github.com/gogf/gf/v3/text/gstr"
"github.com/gogf/gf/v3/util/gconv"
"github.com/gogf/gf/v3/util/gutil"
)
// RuleAfterEqual implements `after-equal` rule:

View File

@ -9,7 +9,7 @@ package builtin
import (
"errors"
"github.com/gogf/gf/v2/internal/json"
"github.com/gogf/gf/v3/internal/json"
)
// RuleArray implements `array` rule:

View File

@ -9,9 +9,9 @@ package builtin
import (
"errors"
"github.com/gogf/gf/v2/text/gstr"
"github.com/gogf/gf/v2/util/gconv"
"github.com/gogf/gf/v2/util/gutil"
"github.com/gogf/gf/v3/text/gstr"
"github.com/gogf/gf/v3/util/gconv"
"github.com/gogf/gf/v3/util/gutil"
)
// RuleBefore implements `before` rule:

View File

@ -9,9 +9,9 @@ package builtin
import (
"errors"
"github.com/gogf/gf/v2/text/gstr"
"github.com/gogf/gf/v2/util/gconv"
"github.com/gogf/gf/v2/util/gutil"
"github.com/gogf/gf/v3/text/gstr"
"github.com/gogf/gf/v3/util/gconv"
"github.com/gogf/gf/v3/util/gutil"
)
// RuleBeforeEqual implements `before-equal` rule:

View File

@ -11,7 +11,7 @@ import (
"strconv"
"strings"
"github.com/gogf/gf/v2/text/gstr"
"github.com/gogf/gf/v3/text/gstr"
)
// RuleBetween implements `between` rule:

View File

@ -10,7 +10,7 @@ import (
"errors"
"time"
"github.com/gogf/gf/v2/text/gregex"
"github.com/gogf/gf/v3/text/gregex"
)
// RuleDate implements `date` rule:

View File

@ -10,7 +10,7 @@ import (
"errors"
"time"
"github.com/gogf/gf/v2/os/gtime"
"github.com/gogf/gf/v3/os/gtime"
)
// RuleDateFormat implements `date-format` rule:

View File

@ -10,7 +10,7 @@ import (
"errors"
"time"
"github.com/gogf/gf/v2/os/gtime"
"github.com/gogf/gf/v3/os/gtime"
)
// RuleDatetime implements `datetime` rule:

View File

@ -10,9 +10,9 @@ import (
"errors"
"strings"
"github.com/gogf/gf/v2/text/gstr"
"github.com/gogf/gf/v2/util/gconv"
"github.com/gogf/gf/v2/util/gutil"
"github.com/gogf/gf/v3/text/gstr"
"github.com/gogf/gf/v3/util/gconv"
"github.com/gogf/gf/v3/util/gutil"
)
// RuleDifferent implements `different` rule:

View File

@ -9,7 +9,7 @@ package builtin
import (
"errors"
"github.com/gogf/gf/v2/text/gregex"
"github.com/gogf/gf/v3/text/gregex"
)
// RuleDomain implements `domain` rule:

View File

@ -9,7 +9,7 @@ package builtin
import (
"errors"
"github.com/gogf/gf/v2/text/gregex"
"github.com/gogf/gf/v3/text/gregex"
)
// RuleEmail implements `email` rule:

View File

@ -11,12 +11,12 @@ import (
"fmt"
"reflect"
"github.com/gogf/gf/v2/errors/gcode"
"github.com/gogf/gf/v2/errors/gerror"
"github.com/gogf/gf/v2/internal/json"
"github.com/gogf/gf/v2/text/gstr"
"github.com/gogf/gf/v2/util/gconv"
"github.com/gogf/gf/v2/util/gtag"
"github.com/gogf/gf/v3/errors/gcode"
"github.com/gogf/gf/v3/errors/gerror"
"github.com/gogf/gf/v3/internal/json"
"github.com/gogf/gf/v3/text/gstr"
"github.com/gogf/gf/v3/util/gconv"
"github.com/gogf/gf/v3/util/gtag"
)
// RuleEnums implements `enums` rule:

View File

@ -10,9 +10,9 @@ import (
"errors"
"strconv"
"github.com/gogf/gf/v2/text/gstr"
"github.com/gogf/gf/v2/util/gconv"
"github.com/gogf/gf/v2/util/gutil"
"github.com/gogf/gf/v3/text/gstr"
"github.com/gogf/gf/v3/util/gconv"
"github.com/gogf/gf/v3/util/gutil"
)
// RuleGT implements `gt` rule:

View File

@ -10,9 +10,9 @@ import (
"errors"
"strconv"
"github.com/gogf/gf/v2/text/gstr"
"github.com/gogf/gf/v2/util/gconv"
"github.com/gogf/gf/v2/util/gutil"
"github.com/gogf/gf/v3/text/gstr"
"github.com/gogf/gf/v3/util/gconv"
"github.com/gogf/gf/v3/util/gutil"
)
// RuleGTE implements `gte` rule:

View File

@ -10,7 +10,7 @@ import (
"errors"
"strings"
"github.com/gogf/gf/v2/text/gstr"
"github.com/gogf/gf/v3/text/gstr"
)
// RuleIn implements `in` rule:

View File

@ -9,8 +9,8 @@ package builtin
import (
"errors"
"github.com/gogf/gf/v2/net/gipv4"
"github.com/gogf/gf/v2/net/gipv6"
"github.com/gogf/gf/v3/net/gipv4"
"github.com/gogf/gf/v3/net/gipv6"
)
// RuleIp implements `ip` rule:

View File

@ -9,7 +9,7 @@ package builtin
import (
"errors"
"github.com/gogf/gf/v2/net/gipv4"
"github.com/gogf/gf/v3/net/gipv4"
)
// RuleIpv4 implements `ipv4` rule:

View File

@ -9,7 +9,7 @@ package builtin
import (
"errors"
"github.com/gogf/gf/v2/net/gipv6"
"github.com/gogf/gf/v3/net/gipv6"
)
// RuleIpv6 implements `ipv6` rule:

View File

@ -9,7 +9,7 @@ package builtin
import (
"errors"
"github.com/gogf/gf/v2/internal/json"
"github.com/gogf/gf/v3/internal/json"
)
// RuleJson implements `json` rule:

View File

@ -11,8 +11,8 @@ import (
"strconv"
"strings"
"github.com/gogf/gf/v2/text/gstr"
"github.com/gogf/gf/v2/util/gconv"
"github.com/gogf/gf/v3/text/gstr"
"github.com/gogf/gf/v3/util/gconv"
)
// RuleLength implements `length` rule:

View File

@ -10,9 +10,9 @@ import (
"errors"
"strconv"
"github.com/gogf/gf/v2/text/gstr"
"github.com/gogf/gf/v2/util/gconv"
"github.com/gogf/gf/v2/util/gutil"
"github.com/gogf/gf/v3/text/gstr"
"github.com/gogf/gf/v3/util/gconv"
"github.com/gogf/gf/v3/util/gutil"
)
// RuleLT implements `lt` rule:

View File

@ -10,9 +10,9 @@ import (
"errors"
"strconv"
"github.com/gogf/gf/v2/text/gstr"
"github.com/gogf/gf/v2/util/gconv"
"github.com/gogf/gf/v2/util/gutil"
"github.com/gogf/gf/v3/text/gstr"
"github.com/gogf/gf/v3/util/gconv"
"github.com/gogf/gf/v3/util/gutil"
)
// RuleLTE implements `lte` rule:

View File

@ -9,7 +9,7 @@ package builtin
import (
"errors"
"github.com/gogf/gf/v2/text/gregex"
"github.com/gogf/gf/v3/text/gregex"
)
// RuleMac implements `mac` rule:

View File

@ -10,7 +10,7 @@ import (
"errors"
"strconv"
"github.com/gogf/gf/v2/text/gstr"
"github.com/gogf/gf/v3/text/gstr"
)
// RuleMax implements `max` rule:

View File

@ -10,8 +10,8 @@ import (
"errors"
"strconv"
"github.com/gogf/gf/v2/text/gstr"
"github.com/gogf/gf/v2/util/gconv"
"github.com/gogf/gf/v3/text/gstr"
"github.com/gogf/gf/v3/util/gconv"
)
// RuleMaxLength implements `max-length` rule:

View File

@ -10,7 +10,7 @@ import (
"errors"
"strconv"
"github.com/gogf/gf/v2/text/gstr"
"github.com/gogf/gf/v3/text/gstr"
)
// RuleMin implements `min` rule:

View File

@ -10,8 +10,8 @@ import (
"errors"
"strconv"
"github.com/gogf/gf/v2/text/gstr"
"github.com/gogf/gf/v2/util/gconv"
"github.com/gogf/gf/v3/text/gstr"
"github.com/gogf/gf/v3/util/gconv"
)
// RuleMinLength implements `min-length` rule:

View File

@ -10,7 +10,7 @@ import (
"errors"
"strings"
"github.com/gogf/gf/v2/text/gstr"
"github.com/gogf/gf/v3/text/gstr"
)
// RuleNotIn implements `not-in` rule:

View File

@ -9,7 +9,7 @@ package builtin
import (
"errors"
"github.com/gogf/gf/v2/text/gregex"
"github.com/gogf/gf/v3/text/gregex"
)
// RuleNotRegex implements `not-regex` rule:

View File

@ -9,7 +9,7 @@ package builtin
import (
"errors"
"github.com/gogf/gf/v2/text/gregex"
"github.com/gogf/gf/v3/text/gregex"
)
// RulePassport implements `passport` rule:

View File

@ -9,7 +9,7 @@ package builtin
import (
"errors"
"github.com/gogf/gf/v2/text/gregex"
"github.com/gogf/gf/v3/text/gregex"
)
// RulePassword implements `password` rule:

View File

@ -9,7 +9,7 @@ package builtin
import (
"errors"
"github.com/gogf/gf/v2/text/gregex"
"github.com/gogf/gf/v3/text/gregex"
)
// RulePassword2 implements `password2` rule:

View File

@ -9,7 +9,7 @@ package builtin
import (
"errors"
"github.com/gogf/gf/v2/text/gregex"
"github.com/gogf/gf/v3/text/gregex"
)
// RulePassword3 implements `password3` rule:

View File

@ -9,7 +9,7 @@ package builtin
import (
"errors"
"github.com/gogf/gf/v2/text/gregex"
"github.com/gogf/gf/v3/text/gregex"
)
// RulePhone implements `phone` rule:

View File

@ -9,7 +9,7 @@ package builtin
import (
"errors"
"github.com/gogf/gf/v2/text/gregex"
"github.com/gogf/gf/v3/text/gregex"
)
// RulePhoneLoose implements `phone-loose` rule:

View File

@ -9,7 +9,7 @@ package builtin
import (
"errors"
"github.com/gogf/gf/v2/text/gregex"
"github.com/gogf/gf/v3/text/gregex"
)
// RulePostcode implements `postcode` rule:

View File

@ -9,7 +9,7 @@ package builtin
import (
"errors"
"github.com/gogf/gf/v2/text/gregex"
"github.com/gogf/gf/v3/text/gregex"
)
// RuleQQ implements `qq` rule:

View File

@ -9,7 +9,7 @@ package builtin
import (
"errors"
"github.com/gogf/gf/v2/text/gregex"
"github.com/gogf/gf/v3/text/gregex"
)
// RuleRegex implements `regex` rule:

View File

@ -10,7 +10,7 @@ import (
"errors"
"reflect"
"github.com/gogf/gf/v2/util/gconv"
"github.com/gogf/gf/v3/util/gconv"
)
// RuleRequired implements `required` rule.

View File

@ -10,10 +10,10 @@ import (
"errors"
"strings"
"github.com/gogf/gf/v2/errors/gcode"
"github.com/gogf/gf/v2/errors/gerror"
"github.com/gogf/gf/v2/util/gconv"
"github.com/gogf/gf/v2/util/gutil"
"github.com/gogf/gf/v3/errors/gcode"
"github.com/gogf/gf/v3/errors/gerror"
"github.com/gogf/gf/v3/util/gconv"
"github.com/gogf/gf/v3/util/gutil"
)
// RuleRequiredIf implements `required-if` rule:

View File

@ -10,10 +10,10 @@ import (
"errors"
"strings"
"github.com/gogf/gf/v2/errors/gcode"
"github.com/gogf/gf/v2/errors/gerror"
"github.com/gogf/gf/v2/util/gconv"
"github.com/gogf/gf/v2/util/gutil"
"github.com/gogf/gf/v3/errors/gcode"
"github.com/gogf/gf/v3/errors/gerror"
"github.com/gogf/gf/v3/util/gconv"
"github.com/gogf/gf/v3/util/gutil"
)
// RuleRequiredIfAll implements `required-if-all` rule:

View File

@ -10,8 +10,8 @@ import (
"errors"
"strings"
"github.com/gogf/gf/v2/util/gconv"
"github.com/gogf/gf/v2/util/gutil"
"github.com/gogf/gf/v3/util/gconv"
"github.com/gogf/gf/v3/util/gutil"
)
// RuleRequiredUnless implements `required-unless` rule:

View File

@ -10,8 +10,8 @@ import (
"errors"
"strings"
"github.com/gogf/gf/v2/internal/empty"
"github.com/gogf/gf/v2/util/gutil"
"github.com/gogf/gf/v3/internal/empty"
"github.com/gogf/gf/v3/util/gutil"
)
// RuleRequiredWith implements `required-with` rule:

View File

@ -10,8 +10,8 @@ import (
"errors"
"strings"
"github.com/gogf/gf/v2/internal/empty"
"github.com/gogf/gf/v2/util/gutil"
"github.com/gogf/gf/v3/internal/empty"
"github.com/gogf/gf/v3/util/gutil"
)
// RuleRequiredWithAll implements `required-with-all` rule:

View File

@ -10,8 +10,8 @@ import (
"errors"
"strings"
"github.com/gogf/gf/v2/internal/empty"
"github.com/gogf/gf/v2/util/gutil"
"github.com/gogf/gf/v3/internal/empty"
"github.com/gogf/gf/v3/util/gutil"
)
// RuleRequiredWithout implements `required-without` rule:

View File

@ -10,8 +10,8 @@ import (
"errors"
"strings"
"github.com/gogf/gf/v2/internal/empty"
"github.com/gogf/gf/v2/util/gutil"
"github.com/gogf/gf/v3/internal/empty"
"github.com/gogf/gf/v3/util/gutil"
)
// RuleRequiredWithoutAll implements `required-without-all` rule:

View File

@ -11,7 +11,7 @@ import (
"strconv"
"strings"
"github.com/gogf/gf/v2/text/gregex"
"github.com/gogf/gf/v3/text/gregex"
)
// RuleResidentId implements `resident-id` rule:

View File

@ -10,9 +10,9 @@ import (
"errors"
"strings"
"github.com/gogf/gf/v2/text/gstr"
"github.com/gogf/gf/v2/util/gconv"
"github.com/gogf/gf/v2/util/gutil"
"github.com/gogf/gf/v3/text/gstr"
"github.com/gogf/gf/v3/util/gconv"
"github.com/gogf/gf/v3/util/gutil"
)
// RuleSame implements `same` rule:

View File

@ -11,7 +11,7 @@ import (
"strconv"
"strings"
"github.com/gogf/gf/v2/util/gconv"
"github.com/gogf/gf/v3/util/gconv"
)
// RuleSize implements `size` rule:

View File

@ -9,7 +9,7 @@ package builtin
import (
"errors"
"github.com/gogf/gf/v2/text/gregex"
"github.com/gogf/gf/v3/text/gregex"
)
// RuleTelephone implements `telephone` rule:

View File

@ -9,7 +9,7 @@ package builtin
import (
"errors"
"github.com/gogf/gf/v2/text/gregex"
"github.com/gogf/gf/v3/text/gregex"
)
// RuleUrl implements `url` rule: