File tree Expand file tree Collapse file tree 3 files changed +764
-1
lines changed Expand file tree Collapse file tree 3 files changed +764
-1
lines changed Original file line number Diff line number Diff line change @@ -139,6 +139,30 @@ func (v *Validation) Email(str string) *ValidationResult {
139
139
return v .apply (Email {Match {emailPattern }}, str )
140
140
}
141
141
142
+ func (v * Validation ) IPAddr (str string , cktype ... int ) * ValidationResult {
143
+ return v .apply (IPAddr {cktype }, str )
144
+ }
145
+
146
+ func (v * Validation ) MacAddr (str string ) * ValidationResult {
147
+ return v .apply (IPAddr {}, str )
148
+ }
149
+
150
+ func (v * Validation ) Domain (str string ) * ValidationResult {
151
+ return v .apply (Domain {}, str )
152
+ }
153
+
154
+ func (v * Validation ) URL (str string ) * ValidationResult {
155
+ return v .apply (URL {}, str )
156
+ }
157
+
158
+ func (v * Validation ) PureText (str string , m int ) * ValidationResult {
159
+ return v .apply (PureText {m }, str )
160
+ }
161
+
162
+ func (v * Validation ) FilePath (str string , m int ) * ValidationResult {
163
+ return v .apply (FilePath {m }, str )
164
+ }
165
+
142
166
func (v * Validation ) apply (chk Validator , obj interface {}) * ValidationResult {
143
167
if chk .IsSatisfied (obj ) {
144
168
return & ValidationResult {Ok : true }
You can’t perform that action at this time.
0 commit comments