No server-side validation possible with HTML5 validation?

Issues related to forms.
Post Reply
Cantenac
Posts: 41
Joined: Thu Jan 09, 2020 3:36 pm

No server-side validation possible with HTML5 validation?

Post by Cantenac »

So the manual does say that server-side validation 'uses the same settings as the JavaScript (client side) validation'.

Would that explain why I get a 500 Internal Server Error if I enable server-side validation while using HTML5 validation?
User avatar
Pablo
Site Admin
Posts: 3918
Joined: Mon Feb 13, 2006 7:00 am
Location: Europe
Contact:

Re: No server-side validation possible with HTML5 validation?

Post by Pablo »

This most likely means that there is an conflict in your settings.
To be able to help you, I need to know all your settings.
Cantenac
Posts: 41
Joined: Thu Jan 09, 2020 3:36 pm

Re: No server-side validation possible with HTML5 validation?

Post by Cantenac »

OK, I've found the problem in the error log. I was testing the form layout before adding all the SMTP settings.

If the SMTP port setting is blank, this throws an error on line 31 of the php form page:

PHP Parse error: syntax error, unexpected ';'[/code]

Line 31 reads:

Code: Select all

$mail->Port = ;
Fixing that to read as follows resolves the problem:

Code: Select all

$mail->Port = ' ';
User avatar
Pablo
Site Admin
Posts: 3918
Joined: Mon Feb 13, 2006 7:00 am
Location: Europe
Contact:

Re: No server-side validation possible with HTML5 validation?

Post by Pablo »

The SMTP port may not be empty.
The default value is 25

Please do not change any of the default settings unless you know what you are doing.
Post Reply