How can I show in UI a configurated restriction message ?

Hi to all ( Bonita 7.1.3 with Windows )

I see that if I use a BDM object in a task without a form, if I configure a Restriction in Contract for a field of the object, if the script of validation returns “false”, when I execute the task, the message that I wrote at Restriction appears after click in submit button.

If now, I configure a form in the same task ( this form takes directly the attributes of the contract object ), when I execute the task, if the field doesn’t pass the validation, the message of Restriction don’t appears.

How can I show the message of Restriction in this case ?.

Example of my restriction: a field named “Age” and I don’t want values down of 18.

Script:
if ( objBDMInput.age < 18 )
return false;
else
return true;

Restriction message:
Error. Only values over 18.

At UI, I can put over de text field “age”, a label with something like “Write 19 or more”, but I want use the message of the Restriction.

Thanks.

Thanks Sean !!! …

Do you know are there any way to do something like that, validate a field ? … or only I can put a label in UI with the restriction ? …

Thanks and regards.

Yesterday, I had a Webinar ( BPM Cam ) and I saw how to use validations at UI, and with the link you send, I think a can do a good job :wink:

Thanks Sean !!! …

Just confirming…

When using the auto form - a message is generated…

When using a generated form (using the UI icon on the Execution->Contract->Constraints tab) then no message is generated…

regards
Seán

You can find this info in the Getting Started Tutorial, see section Create Contracts

http://documentation.bonitasoft.com/getting-started-tutorial-1#Create-contracts

regards
Seán