Skip to content

Commit 9af59ec

Browse files
committed
somtimes planed
1 parent cf5197f commit 9af59ec

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

lib/rules.js

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -176,6 +176,20 @@ class Rules extends Mix {
176176

177177
}
178178

179+
async validateSometimes(field, value, args) {
180+
181+
if (this.isEmpty(value) && !args.length) {
182+
delete this.validator.inputs[field];
183+
return true;
184+
}
185+
186+
if (args.length) {
187+
// to be coded
188+
}
189+
190+
return true;
191+
}
192+
179193
/**
180194
* apply rules on inputs
181195
* @param field

0 commit comments

Comments
 (0)