Custom validation messages & validation checks not working

I’m having big problems with the way DMXzone Validator is working /not working on my page(s). Is there a way to delete it from my project and then have a fresh copy reinstalled?

Screen shot with one example of the many problems. You can see in the screen shot that I have the word “Help” added to the validation message but it does not show up in the message on the web page. Also only one of the validation checks are working even though I have specified both min and max checks be made…

Did you try it in the web browser Norm?

Also checks work one at the time, so if an error is found it is reported and validation stops.

I have tried it on my local browser, the whole thing is really acting crazy - I have a few form fields that don’t show the checks (in the code) but the checks and alerts are working (they were put in the code a long time ago) - somewhere along the way the Validator somehow got disconnected from my project (I’m assuming). Putting them in one at a time does not work / help. I have tried reloading, toggling app connect on and off, saving, republishing I can’t get it to snap back to normal operations. It has been having problems for several builds and today I just decided to look into it. I see no errors using my local browser - I can upload the page to my live server and check.

I do get all of these errors when my page first loads but I have no idea what they mean or how to fix them… one does look like it has something to do with the Validator?

When I clear them out and put in values that are too high or low I don’t see any more errors but not sure I’m looking in the right spot.

The errors only show up on page load / reload…

Should I post the link to the page, will that help ID the problem?

Does anyone have any ideas on how this can be corrected?

No until we see an actual page running with the problem you described.

As for .map files warninngs - that’s not a problem and not related to the issue you initially reported.

This is a live test page that has the issues I mentioned above…

http://www.mypizzamaster.com/calculatorcopy.php

Which fields you have issues with?

The total flour field (is one) - it should display an error message if it is not 100. I only get the message if I go over hundred but it does not work if under a hundred. You change the field by changing the first flour field above it.

And the message that is displayed is not the message I have in the code - it is just using the standard message in the validator script - not what I have in the code (last image)

2018-12-12_09-22-07

2018-12-12_09-21-57

2018-12-12_09-21-12

Any ideas Teodor - and before you go on holiday here is a card I made for you :smiley:

Hi Norm,
I didn’t have time to explore your page. Will do that later today.

I just checked your first flour field. You applied to it:

min-value: 0.1 and max-value: 100 so it properly shows the error message only with values over 100 … . Not sure what are you trying to achieve there on this field?

Change

<input type="number" class="form-control" id="flour1" name="flour1" min="" data-rule-min="0.01" value="100" step="0.5" style="font-size: medium; text-align: center; padding: 0px;" data-rule-max="100" dmx-on:updated="cookies1.set('firstflournumber',value,{expires: 180})" placeholder="100" dmx-bind:value="cookies1.data.firstflournumber.default(100)">

to

<input type="number" class="form-control" id="flour1" name="flour1"  data-rule-min="100" value="100" step="0.5" style="font-size: medium; text-align: center; padding: 0px;" data-rule-max="100" dmx-on:updated="cookies1.set('firstflournumber',value,{expires: 180})" placeholder="100" dmx-bind:value="cookies1.data.firstflournumber.default(100)">

The first field is OK, it can be any value from .1 to 100 - it is the second field Total flour (right under it) that must be 100 - no less and no more.

That field is not working for values less than 100 and the message that is working for over 100 is not what I put in the message. I added the word “Help” to the standard message.

2018-12-12_09-21-12

2018-12-12_09-21-57

Please explain how to you think/ how do you expect this field to work?
What validation message should be displayed when?

Like - > When i click here and there, i expect this to show that.

As soon as click the arrows appearing there (as this is a number field) it shows an error message:
Screenshot_28

I’m on the same page as you and not working on an apple (using Safari) - I will try a tablet…

2018-12-13_07-32-37

Norm,
I believe you are just expecting something to happen when it is not supposed to happen, please:

OK, I see what you did - the total flour field is a calculated field - it adds up the values from the fields flour1 (aka first flour) through flour10 (flour2 through flour10 are hidden unless you increase the flours to mix field on the top of the form (see below).

So if you only use 1 flour and type 99 into the first flour field you should see the error on the total flour field below it. As a matter of fact you should not be able to type into the total flour field I need to figure out how to prevent that.
These are standard bakers percentages and how they work - Total flour must always equal 100. I hope I explained that OK…

2018-12-13_07-38-02

If this helps Teodor, what he is trying to achieve is to set two validations to a single input, the only valid input for the field is 100

If it increases to 100.1 it must show a warning saying “Too Large”
and if it decreases to 99.9 it must show a warning saying “Too Small”

1 Like