Validate decoration

I’ve successfully made some validations in a form in client side with javascript.
Now I want to make some decorations when validation fails like red background in the validated textbox or giving class=‘danger’ and focusing in the validated textbox.
How can I achieve that? Any suggestion?

frappe.msgprint({message: "This is wrong", title: "Watch this", indicator:"red"})