Added simple text-field validation and changed onchange to onblur