Validation : help required - still no joy!

#1

I have a test form at https://daviesandgray.co.uk/bookings3.php which works fine as far as entering data, sending as an email etc. My problem is validation.

I can validate fields such as Email which works fine.

Where I am failing is with both the Dropzone and reCaptcha elements.

The App Structure shows the Validation Rules

The Server Actions Steps shows the server-side Validation Rules
Also note the lack of symbols and misalignment of the word images

And you can see from this screenshot that the upload is in progress BUT the total file size is well in excess of the 1.5Mb, the reCaptcha is not ticked, and there are infact seven images selected (validation is set to a max of 4 images). None of these checks have worked. The progress bar continues to the end but the form is NOT submitted. No errors are given on the page.

What am I not doing?

#2

I can’t vouch for the dropzone, but reCaptcha is validated on the server only.

1 Like
#3

Morning @Teodor, @George and all you clever people, any thoughts on the above?

I’m desperate to get this sorted within the next couple of hours otherwise I’ll have to cancel a little roadtrip :frowning_face:

EDIT : well I decided to go on the roadtrip anyway, we had a lovely overnight stay in Whitby. Back now, and back to square one.

Can anyone help with this? Do I need to create the page again from scratch?

#4

Morning All, I still need help with this issue. I have not managed to get the validation working properly. Typical problems are outlined as follows…

If you press “Send” without entering anything in the form fields, then the client-side Email verification IS caught and the message is not sent. A “This field is required.” message is displayed.
This is CORRECT

If you press “Send” having entered a correctly formatted email address, the message fails to send but no error message is returned (as per @brad’s post rsCaptcha Failed Message Does Not Show).
This is a FAIL

If you press “Send” after entering an email address, checking the reCaptcha box and selecting (say) five 5Mb images, the form will submit even though the Validation Rules are supposed to prevent the form being submitted with more than 3 images and images totalling more than 1.5Mb.
This is a FAIL

Help, please.

EDIT
I have also just realised that the DIV below the reCaptcha does not display when the reCaptch fails

#5

I really don’t want to tag the main men into this topic but as I am getting no answers or guidance I feel I have no choice. @Teodor, @George and @patrick can you help me at all? Sorry guys, I’m getting frustrated and need to make some progress.
Cheers, Neil.

#6

I can’t really help, just offer a process of elimination, can you get the Dropzone validation working by itself without the Recaptcha?

I’m sure we got validation to display by jiggling css and js order about sometime ago but can’t remember exactly…?

1 Like
#7

Cheers for that @Dave. I’m going to start again with something basic and build up slowly, as you suggest trying Dropzone before reCaptcha.

#8

Like I said mate sorry I can’t offer any help. I tend to go back to basics with an issue like this especially. Can be a pain but more often than not in my case I usually find I missed something somewhere… Despite believing that I knew what I was doing somehow I always forget to RTFM properly hahaha…

#9

Haha, yes with you on that. I did try very basics earlier today with one form field and reCaptcha and that Failed! It was very slow processing the reCaptcha and then returned an error.

#10

Still no joy with this issue. I have tried starting afresh with the basics. The form submits OK but the validation rules for Dropzone and reCaptcha do not work.

#11

Sending a valid email address and no tick in reCaptcha, delivers the following


Which means that the reCaptcha works well.

Filling in all of the fields plus sending 6 (small) files allows the form to be submitted


Which means that the validation for the upload field is not correct.

#12

Hello,
I checked your page and the validation on the inputs and recaptcha is working just fine. Same as Ben, i see the validation message under recaptcha.

I notice there is some issue with the client-side validation rules applied to the dropzone. We are going to check that. Maybe you can switch to a regular multi file input meanwhile.

1 Like
assigned patrick #13
#14

Hi guys, really appreciate the replies.

Yes you are right that the reCaptcha works, but only AFTER the whole form has been submitted. So for instance, if all you do is add an email address then the form submits very quickly and the reCaptcha check returns quickly.

But if you complete the form and add, say six 5Mb images taken on a mobile phone (as this is what we typically expect) then the reCaptcha check is not returned for many minutes, even on my 19Mb upload speed takes two minutes! Surely these checks should happen client-side before attempting to upload.

Teodor, your suggestion to switch to a regular multi file input is a good temporary measure.

#15

Are you sure your recaptcha in the server action is the first step of the server action?

#16

Yes, as shown in the screenshots at the top of this post

#17

Please let me know if the regular upload input is working fine.

1 Like
#18

Regular input works fine. BUT the reCaptcha still reports error after it has tried to upload the whole form with images, as you can see with this series of screenshots. The reCaptcha was not check and yet the form tried to upload as shown by the progress bar. After that had finished the “Recaptcha check failed” message was then displayed.