Basic date validation help

Hi,
I've made a very basic date validation script, but the syntax of the until condtion is wrong, could someone have a quick look and correct it please?:slight_smile:
Thanks for any help.

echo -n "Please enter your date of birth (dd-mm-yyyy): "
read dob
day=${dob:0:2} month=${dob:3:2} year=${dob:6:4}
date=`date +%d-%m-%Y`
cyear=${date:6:4}
until [[ $day -gt 0 -a $day -lt 32 ]] && [[ $month -gt -a $month -lt 13 ]] && [[ $year -gt 0 -a $year -le $cyear ]]
do
echo -n "Please enter your date of birth again (dd-mm-yyy): "
read dob
done
$month -gt 0 -a $month -lt 13

Also change -a to &&.