mirror of
https://github.com/myvesta/vesta
synced 2025-08-19 21:04:07 -07:00
commit
664c091e78
1 changed files with 2 additions and 2 deletions
|
@ -467,12 +467,12 @@ sync_cron_jobs() {
|
||||||
is_user_format_valid() {
|
is_user_format_valid() {
|
||||||
if [ ${#1} -eq 1 ]; then
|
if [ ${#1} -eq 1 ]; then
|
||||||
if ! [[ "$1" =~ ^^[[:alnum:]]$ ]]; then
|
if ! [[ "$1" =~ ^^[[:alnum:]]$ ]]; then
|
||||||
echo "invalid $2 format :: $1"
|
check_result $E_INVALID "invalid $2 format :: $1"
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
if ! [[ "$1" =~ ^[[:alnum:]][-|\.|_[:alnum:]]{0,28}[[:alnum:]]$ ]]
|
if ! [[ "$1" =~ ^[[:alnum:]][-|\.|_[:alnum:]]{0,28}[[:alnum:]]$ ]]
|
||||||
then
|
then
|
||||||
echo "invalid $2 format :: $1"
|
check_result $E_INVALID "invalid $2 format :: $1"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue