How can I determine if an input field has been touched and is empty, without using the built-in functions in Angular?
<form-input is-invalid-on="isTouched && !gs.data.name || gs.data.name.length > 50"></form-input>
If
isTouched && !gs.data.name
evaluates to true && false
, then that part of the expression becomes false
.
So, my question is, how do I ensure that the entire expression evaluates to true only when the input field has been touched and is either empty or has a length greater than 50?