Custom made error validation



hi peeps,

I am wondering if there is a way to display error message based on what error is being made. I have noticed that all error message will following according to the Script Validation Message.

Lets say I want a numeric box to be positive and cannot be more than 5000. How do I made the error message displayed varies correctly according to the input?

Thanks all in advance