I can't access any process variables from a constraint script. According to the documentation, it's normal because constraints has been designed this way.
So, how can I perform advanced checks on user input ? If I do it with a script after the task has been submited, I have no way to inform the user something was wrong with his input. If I check the user input on the client side, anyone can easily bypass it.
I could make my own API to execute tasks and define my own constraints without limitations but it seems a bit overkill.