(added) basic input ajax validation