replace error message alert to ref message on top of input.
added more input checks.