validate form input

Comment valider un formulaire

Lorsque nous soumetons un formulaire nous appelons un js formOutput

Ce js renseigne des données a partir d’une extension, nous souhaiterions effectuer une validation fonctionnel
Par exemple verifier que l’ age du stagiare est >15 et dans le cas contraire afficher une message « L’age renseigné doit etre ….. »

Comment pouvons-nous faire ? la partie du script est en erreur, formSubmitError est une variable de type string que nous affichons dans un input text

Script formOutput.js

validation message not displayed

I am running the latest travel tool sample application downloaded from github. The process runs well but the validation message as set in process "constraints is not displayed on form in browser." I have removed the $form.$invalid on submit button for travel request submission form to allow request to go to server so that validation occurs at server and in case of failure, message is displayed on screen.

How to check an user input against a process variable in Bonita 7 ?


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.