MCPcopy Create free account
hub / github.com/PalisadoesFoundation/talawa-api / validateField

Function validateField

scripts/setup/validators.ts:268–276  ·  view source on GitHub ↗

* Validates a single cron field (may contain comma-separated tokens).

(field: string, min: number, max: number)

Source from the content-addressed store, hash-verified

266 * Validates a single cron field (may contain comma-separated tokens).
267 */
268 function validateField(field: string, min: number, max: number): boolean {
269 const tokens = field.split(",");
270 for (const token of tokens) {
271 if (!validateToken(token, min, max)) {
272 return false;
273 }
274 }
275 return true;
276 }
277
278 // Validate each field
279 for (let i = 0; i < 5; i++) {

Callers 1

validateCronExpressionFunction · 0.85

Calls 1

validateTokenFunction · 0.85

Tested by

no test coverage detected