You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Dec 23, 2025. It is now read-only.
Copy file name to clipboardExpand all lines: README.md
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -140,6 +140,7 @@ NOTE: **The `exprName` under the same struct field cannot be the same!**
140
140
|`regexp('^\\w*$')`|Regular match the current struct field, return boolean|
141
141
|`sprintf('X value: %v', (X)$)`|`fmt.Sprintf`, format the value of struct field X|
142
142
|`range(KvExpr, forEachExpr)`|Iterate over an array, slice, or dictionary <br> - `#k` is the element key var <br> - `#v` is the element value var <br> - `##` is the number of elements <br> - e.g. [example](spec_range_test.go)|
143
+
|`in((X)$, enum_1, ...enum_n)`|Check if the first parameter is one of the enumerated parameters|
143
144
144
145
<!-- |`(X)$k`|Traverse each element key of the struct field X(type: map, slice, array)|
145
146
|`(X)$v`|Traverse each element value of the struct field X(type: map, slice, array)| -->
Copy file name to clipboardExpand all lines: validator/README.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -179,9 +179,9 @@ type T struct {
179
179
|`regexp('^\\w*$')`|Regular match the current struct field, return boolean|
180
180
|`sprintf('X value: %v', (X)$)`|`fmt.Sprintf`, format the value of struct field X|
181
181
|`range(KvExpr, forEachExpr)`|Iterate over an array, slice, or dictionary <br> - `#k` is the element key var <br> - `#v` is the element value var <br> - `##` is the number of elements <br> - e.g. [example](../spec_range_test.go)|
182
+
|`in((X)$, enum_1, ...enum_n)`|Check if the first parameter is one of the enumerated parameters|
182
183
|`email((X)$)`|Regular match the struct field X, return true if it is email|
183
184
|`phone((X)$,<'defaultRegion'>)`|Regular match the struct field X, return true if it is phone|
184
-
|`in((X)$, enum_1, ...enum_n)`|Check if the first parameter is one of the enumerated parameters|
185
185
186
186
<!-- |`(X)$k`|Traverse each element key of the struct field X(type: map, slice, array)|
187
187
|`(X)$v`|Traverse each element value of the struct field X(type: map, slice, array)| -->
0 commit comments