you can add different styleclasses based on some flag like an el expression
same you can use for disabling the button
u can use validators/ required attribute for some basic validations.
But your suggestion only works with server side validation, when the form is rerendered.
Is there some place where I can find those flags? I only found component.valid which only works for the input field.