You need to sign in to do that
Don't have an account?
tonitonitone
how to give input field an error highlight from custom controller?
I wrote some validation inside a custom controller that goes beyond the required field validation. The error message appears fine at the top of the page using new ApexPages.Message(ApexPages.severity.ERROR,'...'). But how do I give an input field an error highlighting from the custom controller?
getCustomObject().custom_field__c.addError('some error');
but the target field is still not getting highlighted or flagged in any way, so I'm not sure how to 'retrieve' the error or what happened to the error that I have added to the field.
Just to be clear, I am trying to accomplish something that looks like this --
styleClass="{!IF(some_condition,'errorMsg','')}"