Hello,
I made validations to my sign up page but when I test it I do not see the messages.
Anyone a hint what I have done wrong ?
Roelof
Hi Roelof.
before you check if your form is valid you need to check if your inputs are valid. if not, set the isvalid = false and the message:
After your form = valid, you can do the save.
I did check but on another module.
Or do i misunderstood what you meant ?
did you implement my print screens?
I see what you mean.
Its always necessary to do the validation on the server side / backend side.
But if you want to have validation messages in the input widgets etc. you need to implement it client side, as show in my prints.
I thought I did already implement your screens
Nope:
I cannot implement that code because at that point multiple inputs were checked.
you can see it if you follow the save-signup server action.
you can check all widgets in one action and then see if your form is valid.
you can also implement tha validation in the onchange event of the widget.
Hi @Roelof Wobben
You just add the message in your action flow.
Thanks and regards
Vednarayan
Hi Roelof,
I saw you're doing a lot of server-side validations for some of the fields on your form, which could be done on the client side, and therefore improve the usability and performance of your implementation.
I would suggest you change your logic in the following way:
You can see a good example above, on Stefano's post.
Hope this helps.
Best regards,
Paulo Moreira
I know I did that for security reasons.
Every good hacker can change things on the client side so he/she gets data which she/he is not allowed to see.
And with the laws in Europe , you can get very big fines when you have a data leak.
You are correct. you should always do your security checks and data/input validations both on client and server side.
Client side to provide fast and detailed information to the user on the screen. Backend to ensure security and data are valid on the server.
hmm., then I think im doing something not right.
Rigth now my backend is also providing the error messages.
If I gave you a .oap could you look how that looks iike ?
In traditional that will work just fine, because there was always interaction with the server.
But now we have Reactive and client actions, it is better to do it in client actions.
Send the oml and i will add a few possible validations:
You can do all validations in the send button, or you can do a field validation after the onchange event.
oke, it is then save for security reasons.
I was always told that client side could be changed and exposing data.
I have already a lot of validations on the server side.
i can't publish because you did not send the entire project and i have missing dependencies.
But you can still use my print screens.
If you want to do the validation on a field right after the change on the widget do it like this:
The Onsave: