@@ -945,7 +945,6 @@ func isNeField(fl FieldLevel) bool {
945
945
}
946
946
947
947
switch kind {
948
-
949
948
case reflect .Int , reflect .Int8 , reflect .Int16 , reflect .Int32 , reflect .Int64 :
950
949
return field .Int () != currentField .Int ()
951
950
@@ -966,7 +965,6 @@ func isNeField(fl FieldLevel) bool {
966
965
fieldType := field .Type ()
967
966
968
967
if fieldType .ConvertibleTo (timeType ) && currentField .Type ().ConvertibleTo (timeType ) {
969
-
970
968
t := currentField .Interface ().(time.Time )
971
969
fieldTime := field .Interface ().(time.Time )
972
970
@@ -1005,7 +1003,6 @@ func isLteCrossStructField(fl FieldLevel) bool {
1005
1003
}
1006
1004
1007
1005
switch kind {
1008
-
1009
1006
case reflect .Int , reflect .Int8 , reflect .Int16 , reflect .Int32 , reflect .Int64 :
1010
1007
return field .Int () <= topField .Int ()
1011
1008
@@ -1023,7 +1020,6 @@ func isLteCrossStructField(fl FieldLevel) bool {
1023
1020
fieldType := field .Type ()
1024
1021
1025
1022
if fieldType .ConvertibleTo (timeType ) && topField .Type ().ConvertibleTo (timeType ) {
1026
-
1027
1023
fieldTime := field .Convert (timeType ).Interface ().(time.Time )
1028
1024
topTime := topField .Convert (timeType ).Interface ().(time.Time )
1029
1025
@@ -1052,7 +1048,6 @@ func isLtCrossStructField(fl FieldLevel) bool {
1052
1048
}
1053
1049
1054
1050
switch kind {
1055
-
1056
1051
case reflect .Int , reflect .Int8 , reflect .Int16 , reflect .Int32 , reflect .Int64 :
1057
1052
return field .Int () < topField .Int ()
1058
1053
@@ -1070,7 +1065,6 @@ func isLtCrossStructField(fl FieldLevel) bool {
1070
1065
fieldType := field .Type ()
1071
1066
1072
1067
if fieldType .ConvertibleTo (timeType ) && topField .Type ().ConvertibleTo (timeType ) {
1073
-
1074
1068
fieldTime := field .Convert (timeType ).Interface ().(time.Time )
1075
1069
topTime := topField .Convert (timeType ).Interface ().(time.Time )
1076
1070
@@ -1098,7 +1092,6 @@ func isGteCrossStructField(fl FieldLevel) bool {
1098
1092
}
1099
1093
1100
1094
switch kind {
1101
-
1102
1095
case reflect .Int , reflect .Int8 , reflect .Int16 , reflect .Int32 , reflect .Int64 :
1103
1096
return field .Int () >= topField .Int ()
1104
1097
@@ -1116,7 +1109,6 @@ func isGteCrossStructField(fl FieldLevel) bool {
1116
1109
fieldType := field .Type ()
1117
1110
1118
1111
if fieldType .ConvertibleTo (timeType ) && topField .Type ().ConvertibleTo (timeType ) {
1119
-
1120
1112
fieldTime := field .Convert (timeType ).Interface ().(time.Time )
1121
1113
topTime := topField .Convert (timeType ).Interface ().(time.Time )
1122
1114
@@ -1144,7 +1136,6 @@ func isGtCrossStructField(fl FieldLevel) bool {
1144
1136
}
1145
1137
1146
1138
switch kind {
1147
-
1148
1139
case reflect .Int , reflect .Int8 , reflect .Int16 , reflect .Int32 , reflect .Int64 :
1149
1140
return field .Int () > topField .Int ()
1150
1141
@@ -1162,7 +1153,6 @@ func isGtCrossStructField(fl FieldLevel) bool {
1162
1153
fieldType := field .Type ()
1163
1154
1164
1155
if fieldType .ConvertibleTo (timeType ) && topField .Type ().ConvertibleTo (timeType ) {
1165
-
1166
1156
fieldTime := field .Convert (timeType ).Interface ().(time.Time )
1167
1157
topTime := topField .Convert (timeType ).Interface ().(time.Time )
1168
1158
@@ -1190,7 +1180,6 @@ func isNeCrossStructField(fl FieldLevel) bool {
1190
1180
}
1191
1181
1192
1182
switch kind {
1193
-
1194
1183
case reflect .Int , reflect .Int8 , reflect .Int16 , reflect .Int32 , reflect .Int64 :
1195
1184
return topField .Int () != field .Int ()
1196
1185
@@ -1211,7 +1200,6 @@ func isNeCrossStructField(fl FieldLevel) bool {
1211
1200
fieldType := field .Type ()
1212
1201
1213
1202
if fieldType .ConvertibleTo (timeType ) && topField .Type ().ConvertibleTo (timeType ) {
1214
-
1215
1203
t := field .Convert (timeType ).Interface ().(time.Time )
1216
1204
fieldTime := topField .Convert (timeType ).Interface ().(time.Time )
1217
1205
@@ -1239,7 +1227,6 @@ func isEqCrossStructField(fl FieldLevel) bool {
1239
1227
}
1240
1228
1241
1229
switch kind {
1242
-
1243
1230
case reflect .Int , reflect .Int8 , reflect .Int16 , reflect .Int32 , reflect .Int64 :
1244
1231
return topField .Int () == field .Int ()
1245
1232
@@ -1260,7 +1247,6 @@ func isEqCrossStructField(fl FieldLevel) bool {
1260
1247
fieldType := field .Type ()
1261
1248
1262
1249
if fieldType .ConvertibleTo (timeType ) && topField .Type ().ConvertibleTo (timeType ) {
1263
-
1264
1250
t := field .Convert (timeType ).Interface ().(time.Time )
1265
1251
fieldTime := topField .Convert (timeType ).Interface ().(time.Time )
1266
1252
@@ -1288,7 +1274,6 @@ func isEqField(fl FieldLevel) bool {
1288
1274
}
1289
1275
1290
1276
switch kind {
1291
-
1292
1277
case reflect .Int , reflect .Int8 , reflect .Int16 , reflect .Int32 , reflect .Int64 :
1293
1278
return field .Int () == currentField .Int ()
1294
1279
@@ -1309,7 +1294,6 @@ func isEqField(fl FieldLevel) bool {
1309
1294
fieldType := field .Type ()
1310
1295
1311
1296
if fieldType .ConvertibleTo (timeType ) && currentField .Type ().ConvertibleTo (timeType ) {
1312
-
1313
1297
t := currentField .Convert (timeType ).Interface ().(time.Time )
1314
1298
fieldTime := field .Convert (timeType ).Interface ().(time.Time )
1315
1299
@@ -1332,7 +1316,6 @@ func isEq(fl FieldLevel) bool {
1332
1316
param := fl .Param ()
1333
1317
1334
1318
switch field .Kind () {
1335
-
1336
1319
case reflect .String :
1337
1320
return field .String () == param
1338
1321
@@ -1851,7 +1834,6 @@ func requireCheckFieldValue(
1851
1834
}
1852
1835
1853
1836
switch kind {
1854
-
1855
1837
case reflect .Int , reflect .Int8 , reflect .Int16 , reflect .Int32 , reflect .Int64 :
1856
1838
return field .Int () == asInt (value )
1857
1839
@@ -2060,7 +2042,6 @@ func isGteField(fl FieldLevel) bool {
2060
2042
}
2061
2043
2062
2044
switch kind {
2063
-
2064
2045
case reflect .Int , reflect .Int8 , reflect .Int16 , reflect .Int32 , reflect .Int64 :
2065
2046
2066
2047
return field .Int () >= currentField .Int ()
@@ -2078,7 +2059,6 @@ func isGteField(fl FieldLevel) bool {
2078
2059
fieldType := field .Type ()
2079
2060
2080
2061
if fieldType .ConvertibleTo (timeType ) && currentField .Type ().ConvertibleTo (timeType ) {
2081
-
2082
2062
t := currentField .Convert (timeType ).Interface ().(time.Time )
2083
2063
fieldTime := field .Convert (timeType ).Interface ().(time.Time )
2084
2064
@@ -2106,7 +2086,6 @@ func isGtField(fl FieldLevel) bool {
2106
2086
}
2107
2087
2108
2088
switch kind {
2109
-
2110
2089
case reflect .Int , reflect .Int8 , reflect .Int16 , reflect .Int32 , reflect .Int64 :
2111
2090
2112
2091
return field .Int () > currentField .Int ()
@@ -2124,7 +2103,6 @@ func isGtField(fl FieldLevel) bool {
2124
2103
fieldType := field .Type ()
2125
2104
2126
2105
if fieldType .ConvertibleTo (timeType ) && currentField .Type ().ConvertibleTo (timeType ) {
2127
-
2128
2106
t := currentField .Convert (timeType ).Interface ().(time.Time )
2129
2107
fieldTime := field .Convert (timeType ).Interface ().(time.Time )
2130
2108
@@ -2147,7 +2125,6 @@ func isGte(fl FieldLevel) bool {
2147
2125
param := fl .Param ()
2148
2126
2149
2127
switch field .Kind () {
2150
-
2151
2128
case reflect .String :
2152
2129
p := asInt (param )
2153
2130
@@ -2181,7 +2158,6 @@ func isGte(fl FieldLevel) bool {
2181
2158
case reflect .Struct :
2182
2159
2183
2160
if field .Type ().ConvertibleTo (timeType ) {
2184
-
2185
2161
now := time .Now ().UTC ()
2186
2162
t := field .Convert (timeType ).Interface ().(time.Time )
2187
2163
@@ -2198,7 +2174,6 @@ func isGt(fl FieldLevel) bool {
2198
2174
param := fl .Param ()
2199
2175
2200
2176
switch field .Kind () {
2201
-
2202
2177
case reflect .String :
2203
2178
p := asInt (param )
2204
2179
@@ -2245,7 +2220,6 @@ func hasLengthOf(fl FieldLevel) bool {
2245
2220
param := fl .Param ()
2246
2221
2247
2222
switch field .Kind () {
2248
-
2249
2223
case reflect .String :
2250
2224
p := asInt (param )
2251
2225
@@ -2296,7 +2270,6 @@ func isLteField(fl FieldLevel) bool {
2296
2270
}
2297
2271
2298
2272
switch kind {
2299
-
2300
2273
case reflect .Int , reflect .Int8 , reflect .Int16 , reflect .Int32 , reflect .Int64 :
2301
2274
2302
2275
return field .Int () <= currentField .Int ()
@@ -2314,7 +2287,6 @@ func isLteField(fl FieldLevel) bool {
2314
2287
fieldType := field .Type ()
2315
2288
2316
2289
if fieldType .ConvertibleTo (timeType ) && currentField .Type ().ConvertibleTo (timeType ) {
2317
-
2318
2290
t := currentField .Convert (timeType ).Interface ().(time.Time )
2319
2291
fieldTime := field .Convert (timeType ).Interface ().(time.Time )
2320
2292
@@ -2342,7 +2314,6 @@ func isLtField(fl FieldLevel) bool {
2342
2314
}
2343
2315
2344
2316
switch kind {
2345
-
2346
2317
case reflect .Int , reflect .Int8 , reflect .Int16 , reflect .Int32 , reflect .Int64 :
2347
2318
2348
2319
return field .Int () < currentField .Int ()
@@ -2360,7 +2331,6 @@ func isLtField(fl FieldLevel) bool {
2360
2331
fieldType := field .Type ()
2361
2332
2362
2333
if fieldType .ConvertibleTo (timeType ) && currentField .Type ().ConvertibleTo (timeType ) {
2363
-
2364
2334
t := currentField .Convert (timeType ).Interface ().(time.Time )
2365
2335
fieldTime := field .Convert (timeType ).Interface ().(time.Time )
2366
2336
@@ -2383,7 +2353,6 @@ func isLte(fl FieldLevel) bool {
2383
2353
param := fl .Param ()
2384
2354
2385
2355
switch field .Kind () {
2386
-
2387
2356
case reflect .String :
2388
2357
p := asInt (param )
2389
2358
@@ -2417,7 +2386,6 @@ func isLte(fl FieldLevel) bool {
2417
2386
case reflect .Struct :
2418
2387
2419
2388
if field .Type ().ConvertibleTo (timeType ) {
2420
-
2421
2389
now := time .Now ().UTC ()
2422
2390
t := field .Convert (timeType ).Interface ().(time.Time )
2423
2391
@@ -2434,7 +2402,6 @@ func isLt(fl FieldLevel) bool {
2434
2402
param := fl .Param ()
2435
2403
2436
2404
switch field .Kind () {
2437
-
2438
2405
case reflect .String :
2439
2406
p := asInt (param )
2440
2407
0 commit comments