Reactive app. Field mandatory and still no validation on it

Helllo, 


On the traditional web app when you made a field mandotory and set the validation on server you did not enter something into a field , you get a error message.


But on a my reactive appp the code went on. 

Is  there something wierd on the reactive apps or do I overlook something ? 

 the problem is when you presss   new movie and then on that screen press on the search button 

Roelof


Hi
In your action you have something to check if your Form.Valid = True ?

More an better detail here: https://success.outsystems.com/Documentation/11/Developing_an_Application/Design_UI/Forms/Validate_Form_Inputs

Hope it helps :),

Roelof Wobben wrote:

Helllo, 


On the traditional web app when you made a field mandotory and set the validation on server you did not enter something into a field , you get a error message.


But on a my reactive appp the code went on. 

Is  there something wierd on the reactive apps or do I overlook something ? 

 the problem is when you presss   new movie and then on that screen press on the search button 

Roelof


Hi Roelof,

For validation of your form make sure you check the form.Valid attribute in your "new movie" action.
A simple if as in the example below would suffice.

Kind regards,

Glenn

Both thanks, but I do not use a form at the moment.

Schould I delete the movie input and the save button , make a form and place them back ?


Roelof


Roelof Wobben wrote:

Both thanks, but I do not use a form at the moment.

Schould I delete the movie input and the save button , make a form and place them back ?


Roelof



You need to place all the input widgets in a form. This way you can check for custom validations and use the form.valid option. 


I suggest you take a look at the training:


https://www.outsystems.com/learn/lesson/1957/demo-how-to-use-the-form-widget/?LearningPathId=0

Solution

Actually, you don't need a form to perform the validations. Since you only have one input, you can directly check its "Valid" property:

Solution