How to pass error to custom renderer (React)?

There is a similar question , but the answer isn’t clear for me.

It says:

just determine the errors for postalCode.value and show them in your postalCode renderer.

But how can I determine the errors ?