mirror of
https://github.com/BrenBroZAYT/gameyfin.git
synced 2026-06-15 08:15:37 +00:00
Move package "de.grimsi.gameyfin" to "org.gameyfin"
This commit is contained in:
@@ -0,0 +1,10 @@
|
||||
import * as Yup from "yup";
|
||||
import {isValidCron} from "cron-validator";
|
||||
|
||||
// Custom validator for cron expressions
|
||||
Yup.addMethod(Yup.string, 'cron', function (message) {
|
||||
return this.test('cron', message, function (value) {
|
||||
const {path, createError} = this;
|
||||
return isValidCron(value as string) || createError({path, message: message || 'Invalid cron expression'});
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user