I'm trying to change an input style when it is not valid , in advance to it's message. I found this example, and tried it, but could not see the invalid input background color changing. when the input is invalid, I see it's inavlid message and I can see that it's styleClass has been changed to the one in the postValidationLisenter.
Is there a reason that i see the correct styleClass but the input style is not changed? is there another way to change the input's style, but not from the client side? I want it to be automatic for every invalid input.
UPDATE:
I tried now to add the styleClass to the input in the input itself, but still could not view the border and background color. if i put theses style defenitions inside style
in the input , I'm able to see them. Is it some kind of bug? I know that it can't be the css file beacuse i have there other css defenitions which are shown.
turns out it was that the css definition had a missing !important
in it, and this is why i couldn't see the border color. so it's not even related to the invalid issue.
I found it here.