mirror of
https://github.com/pterodactyl/panel.git
synced 2026-12-02 12:25:44 -05:00
14 lines
335 B
TypeScript
14 lines
335 B
TypeScript
import i18next from 'i18next';
|
|
|
|
export const validateShortCode = (value: string): string | undefined => {
|
|
if (value.length < 1) {
|
|
return i18next.t('A short code must be provided.');
|
|
}
|
|
|
|
if (value.length > 60) {
|
|
return i18next.t('A short code must not exceed 60 characters.');
|
|
}
|
|
|
|
return undefined;
|
|
};
|