3

I need assistance determining what is doing client side validation on a site.

There is a web form on a site, and it does some client side validation on a field labelled Email (named Question2). This is the page: http://www.home-energy-analytics.co.uk/concrete5.6.1/index.php?cID=132.

If you add a "1" to the email field and then change the focus to another element, you'll see the border turn red. If you try to submit the form, the client prevents it, and shows what looks like an absolutely positioned div with the text, "Please enter an email address". It doesn't seem possible to inspect this element using firefox or firebug. I have checked all the inline scripts and those in separate files, but cannot see what is doing these validations.

It looks like there may be a script which is created dynamically by the client using the ccm_addHeaderItem function in the ccm-base script, but I cannot see how that function is being called, in order to work out the URL of any dynamically created script.

Are you able to find the function(s) doing these validations?

Note, as this is a concrete5 site, I have asked on the concrete5 forums without success.

2
  • 1
    Nothing visible happening here in Chrome when I put a "1" in the email field and then change focus to another element. Commented Apr 19, 2013 at 7:56
  • yes, doesn't seem to change to red in chrome, but if you submit with the "1" the "please enter.." element does appear. Commented Apr 19, 2013 at 8:31

1 Answer 1

2

This is a HTML5 feature. It will be implemented by browser default behavior. Check the example here http://www.w3schools.com/html/tryit.asp?filename=tryhtml5_input_type_email This behaviour can be seen anywhere for a input field with type "email"

Sign up to request clarification or add additional context in comments.

2 Comments

I was about to write "the input type is text", but before I did I checked and yes, it's email. That is a big "doh!" moment for me. Thanks. It certainly explains it as default browser behaviour to an element type. I feel I can relax now! That said, still interested to find this script and function jfriend00 mentions.
btw, I hope the anti w3schools fascists don't get you. I like w3schools myself. It's taught me a lot.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.