Javascript Validate Text Input Onchange Event In Angular