Dynamic attribute "Max"

Dynamic attribute “Max” for numeric field in form is not validated any more.
Is it a bug, or is something wrong with the code.
Ordinary PHP project, Working version saved about 9 month ago.

Field set as Required- does not validate
field set minimum value to 1 - Not validated
field set dynamic attribute “Max” value from database - not validated
But If I use the up arrow in numeric field it stops at the Max value, if I write a value higher than the max value it is accepted


Regards Olav

Check the following are linked on your page and the files uploaded to your server

<link rel="stylesheet" href="dmxAppConnect/dmxValidator/dmxValidator.css" />
<script src="dmxAppConnect/dmxValidator/dmxValidator.js"></script>

looks like this

image

server looks like this, no errors about missing files in console

image

I’ve tested the validation with a dynamic max attribute and it works fine. It seems that nothing is validating for you, do you have a live sample of the page which I could test?

Have been working with this problem since yesterday, and the problem is solved just 5 min ago.
This form was actually not submitted, it just added values to local storage, then the form was cleared and modal closed.
Validation used to work, but not any more.
Now first time validation starts at form submit. So I had to make the button a submit button, create a dummy empty API file for the form and move the button actions to the forms success dynamic event. Then the field is validated, and after that validated on every field value change.

As this was working earlier I think that validation was started when field value changed when this page was first created.

But you would know if anything in Wappler is changed regarding this

This change was done quite a few versions ago.
Validations now only happens on submit the first time.
If validation fails, then change in field’s value triggers validation.

It is sometimes hard to remember that you used validation in a form that is not submitted in a page created over a year ago.
Its also hard to remember every little change in the way wappler behave in the same period.

That’s why this forum is so great. Thanks for confirming my changes :grinning:

Initially the validation works like all validation plugins on form submit, at some point this was broken and it was validating the inputs on any change. A lot of users where seeing this probably as intended and never posted it as bug until a while back when it was posted as a bug and it got fixed. The bug was in the validation a long time, so many users probably thought it was the normal behavior that the validation would trigger on any change.

A post was split to a new topic: Dropzone required validation is not working on submit