Changing name validation regex to allow dashes

Great for readable naming conventions.
This commit is contained in:
johanfagerstroem 2018-05-01 16:38:38 +02:00
parent 33ed7e7012
commit 23cc58ce3a

View file

@ -141,8 +141,8 @@ if [ -z "${NAME}" ]; then
read -r NAME
fi
if [[ "${NAME}" =~ [^a-zA-Z0-9] ]]; then
echo "Name can only contain alphanumeric characters."
if [[ "${NAME}" =~ [^a-zA-Z0-9\-] ]]; then
echo "Name can only contain alphanumeric characters and dashes (-)."
exit 1
fi