close ad
WARNING: Do Not Install the DREAMWEAVER CC 2017 or 2018 Update »
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

blocking a tld

Thread began 10/05/2017 4:05 pm by p_vouers282571 | Last modified 10/10/2017 7:14 pm by Ray Borduin | 57 views | 14 replies |

p_vouers282571

blocking a tld

is there a way with the form validation to not allow any email addresses ending in .ru

Sign in to reply to this post

Ray BorduinWebAssist

Are you using client or server validation? I'm sure it can be done with a regular expression.

Sign in to reply to this post

p_vouers282571

client side. I want the form to fail if the email address ends with .ru

Sign in to reply to this post

Ray BorduinWebAssist

I looked into this and it wasn't really easy to do. So I updated the jquery.h5validate.js file to make it possible.

Replace your version of the file with the one I have attached.

Then you can add a new attribute to your input field that you want to add the validation to like this:

html:
<input type="email" validate="notspam"


And then add a function to defile what notspam means like:

<script>
function notspam(el,val) {
var notAllowed = /\.ru\s*$/i;
if (notAllowed.test(val)) return false;
return true;
}
</script>
Attached Files
jquery.h5validate.js
Sign in to reply to this post

p_vouers282571

thanks BUT this is weird. When I submit the form it WILL NOT send the email to the BCC (me) BUT it still goes straight through to the main site email.
I never used jquery validation so I am probably doing something wrong. Here is the link to my contact page.
https://jwdrivingssl.com/contact.php

Sign in to reply to this post

Ray BorduinWebAssist

Your jquery validate scripts have to be below your jquery includes... and you have to use a separate <script> tag for your inline script, you can't combine it with an external script file. So this code:

<script type="text/javascript" src="webassist/jq_validation/jquery.h5validate.js">
function notspam(el,val) {
var notAllowed = /\.ru\s*$/i;
if (notAllowed.test(val)) return false;
return true;
}
</script>



needs to look like:

<script type="text/javascript" src="webassist/jq_validation/jquery.h5validate.js"></script>
<script>
function notspam(el,val) {
var notAllowed = /\.ru\s*$/i;
if (notAllowed.test(val)) return false;
return true;
}
</script>



And all of that code needs to move down to below the jquery.js code reference.

Sign in to reply to this post

p_vouers282571

still no go, must be me. See attached private msg

Sign in to reply to this post

Ray BorduinWebAssist

I can't debug it easily looking at the script. Do you have a URL? I see the old url you gave hasn't been updated.

Sign in to reply to this post

p_vouers282571

https://jwdrivingssl.com/contact.php
is the current version. I just uploaded it

Sign in to reply to this post

p_vouers282571

also the script DOES BLOCK the email to the bcc, but passes it to the main email

Sign in to reply to this post
loading

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...