mirror of
https://github.com/10h30/kazewp.git
synced 2026-05-12 23:31:27 +09:00
Check if user input empty username
This commit is contained in:
@@ -14,4 +14,12 @@ validate_email() {
|
||||
return 1
|
||||
fi
|
||||
return 0
|
||||
}
|
||||
|
||||
validate_username() {
|
||||
if [[ -z "$1" ]] || [[ "$1" =~ ^[[:space:]]*$ ]]; then
|
||||
echo -e "${RED}Username cannot be empty${NC}"
|
||||
return 1
|
||||
fi
|
||||
return 0
|
||||
}
|
||||
Reference in New Issue
Block a user