I'm not clear on your post and its title.
But if your question is how to flag invalid values, then validations are used for that.
e.g.,
validations: [
{ type: 'minLen', value: 1, msg: "Required." },
{ type: 'maxLen', value: 20, msg: "length should be <= 20" }
]