Jump to content

Search the Community

Showing results for tags 'Validation'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


  • W3Schools
    • General
    • Suggestions
    • Critiques
  • HTML Forums
    • CSS
  • Browser Scripting
    • JavaScript
    • VBScript
  • Server Scripting
    • Web Servers
    • Version Control
    • SQL
    • ASP
    • PHP
    • .NET
    • ColdFusion
    • Java/JSP/J2EE
    • CGI
  • XML Forums
    • XML
    • Schema
    • Web Services
  • Multimedia
    • Multimedia
    • FLASH

Find results in...

Find results that contain...

Date Created

  • Start


Last Updated

  • Start


Filter by number of...


  • Start





Website URL








Found 21 results

  1. I want to use preg_replace to input only a-zAZ with a limit of 30 characters I have a piece of code I used before but it works with preg_match. example function: <?php // input form to get the name // use the function here $name = valid_name($name); // function to validate name input function valid_name($data){ $data = ltrim($data); $data = rtrim($data); $data = preg_replace("/^(?:[A-Za-z][A-Za-z\-]{2,30}[A-Za-z]|[A-Za-z])$/", '' , $data); return $data; } ?> To give an impression of how I use it; a part of the confir
  2. Hi I cannot find a way to validate this code. marked in red error The report I get back is "expected Element p not allowed as child of element h2 in this context" <div class="content-grid"> <a href="single.html" class="b-link-stripe b-animate-go"> <img src="images/pi2.jpg" alt="rose"> <div class="b-wrapper"> <h2 class="b-animate b-from-left b-delay03 "> <span>Cool App Design</span> <p>development, mobile</p> <i> </i> </h2> </div> When I rewrite to; <div class="content-grid"> <a h
  3. How should I validate 'wrong' or 'fake' protocols? Not sure how to explain this. I mean type mismatches like gttps : // but also random chars like qwerty : // should be validated. So chars before : // ( placed spaces in the protocols above else I wasnt possible to post it here) How to do this with regex php?
  4. Hi there I'm looking for a way to strip multiple backslashes. I'm able to strip up to 7 backslashes. This is my code: $url = stripslashes($url); $url = stripslashes($url); $url = stripslashes($url); You read it well, I used it 3 times. I know the backslash is a delimiter so it is necessary to use it 3 times to strip one slash. But my goal is (like with other characters) to strip all. How is PHP handling this?
  5. I'm looking for a way to block input in a text field occuring more than 5 times. For example aaaaaa is wrong but: A sentence having an input of a happening several times or even more is okay. above sentence has 7 inputs and shouldnt be blocked. What is the solution?
  6. Hello Forum! I have a little problem. What I have is a registration page. I want to validate the input of the user in real time. I use JQuery. $("#inputUsername").change(checkUsername); $("#inputEmail").change(checkEmail); $("#inputPassword").change(checkPassword); $("#inputPasswordConfirm").change(checkPasswordConfirm); I check if something was changed. For example like this: function checkUsername() { $(this).popover({placement:"right", container:'body'}); var username = $(this).val(); if(username == '') { $(this).data('bs.popover').options.content = 'Please enter a
  7. Can someone give an example of a php script that lets a form with checkbox input choose between 2 different pages when it is checked or not. Actually the dilemma is that the action attribute is sending form data to another pages (2 pages) - but dont know what code to use - . So if the checkbox isnt checked a third page should load in the browser.
  8. Hi, I have a details screen where visitors to the website can leave their contact info. I have some javascript rules to validate some of the fields when the visitor is filling them out so they cannot leave certain fields empty. I have an email field where aswell as stopping the visitor leaving the field blank i want a validation check so it looks for the presence of "@" and a "." within the field. But I am having trouble getting this implemented. Currently my code for the blank checks looks like this (with the email field in the last block) :- </script><script language="javascript
  9. Hi all, I noticed while deciding to randomly validate sites (As you do...?) the Colour Picker png is missing an ALT tag @ http://www.w3schools.com/ as @ 1am 29/04/2015 NZST. Line 807, Column 101: An img element must have an alt attribute, except under certain conditions. For details, consult guidance on providing text alternatives for images.…ef_colorpicker.asp"><img class="colorpicker" src="/images/colorpicker.png"></a>
  10. I was wondering if someone could help me. We were learning some basic javascript in class and I can't seem to get my form to validate. Basically all I wanted it to do is return an error when nothing is entered in the field. I've done it the way we were taught in class via examples. Any help would be much appreciated!! index.html
  11. Hi guys! I've been working on a login form and I have some problems to validate the input data, I need to consist if the login and password fields aren't with spaces or no allowed characters, for this I've been used JavaScript for client-side validation, but if the fields are Ok, I need to call my php function to see if the user and pass are on mySQL database. I don't know how to "call" the php after the JavaScript validation. If someone could help me I will be thankful.
  12. I have been trying to find a solution to my problem is the last 10 days, and I found nothing. So, I am trying to restrict the Authentication Context XML Schema Definition of SAML 2.0. The XSD document is accessible at http://docs.oasis-open.org/security/saml/v2.0/saml-schema-authn-context-types-2.0.xsd. The part that I am trying to restrict is the one related to this part of the XSD document: <xs:complexType name="PasswordType"> <xs:sequence> <xs:element ref="Length" minOccurs="0"/> <xs:element ref="Alphabet" minOccurs="0"/> <xs:element ref="Generation" m
  13. [size=3][font=arial, helvetica, sans-serif]Hello,[/font][/size] [size=3][font=arial, helvetica, sans-serif]When validating W3C XHTML 1.0 Transitional I keep getting the error there is no attribute "srcset".[/font][/size][size=3][font=arial, helvetica, sans-serif]The code looks similar to the one on [url="http://www.w3.org/html/wg/drafts/srcset/w3c-srcset/"]http://www.w3.org/ht...set/w3c-srcset/[/url], but it still doesn't work.[/font][/size] [size=3][font=arial, helvetica, sans-serif]<div class="imageself self" style="width:468px;height:121px;">[/font][/si
  14. Hello people, I'm a new member here and this is my first post. I have a form with 3 fields (UserID, UserFirstname, UserSurname). I want a jquery validation script that would check if the UserID entered is in the database. If TRUE it should echo "Valid UserID" and If FALSE it should echo "Invalid UserID" I have the following codes but it seems not to be executing the PHP File. ///Sign Up Form<div id="form"><form method="post" action="validate.php" id="formID"> <table width="351" height="155" border="0"> <tr> <td width="103">Sign Up Level<span class="styl
  15. Hello there, I am new to these forums and I am hoping I can get a lot of help from here Basically i've looked through the W3C markup validation service to see if there any errors in my CSS coding because my site isnt looking right in IE. What i've found is that all the errors arn't actually errors? Please if anyone could click the link below and tell me what the supposed errors are? http://validator.w3....=Inline&group=0 The site: http://mandownclothing.com/ Thank you in advanced! Kieran P.S I have attached an example image.
  16. Trying to get a site, page by page validated. <script src="http://www.apple.com/library/quicktime/scripts/ac_quicktime.js" language="JavaScript" type="text/javascript"></script>'The language attribute on the script element is obsolete. You can safely omit it.' Everything on the site will function without the use of these scripts? I currently have 4 scripts between the head tags, and unclear as to why i wouldn't need them? Also, it says this error message for all of ym <h> tags. Where else do they go??Element h7 not allowed as child of element div in this context. (Suppres
  17. My website is getting closer to being completed but it does not validate and with over 278 errors, its annoying (im so tired now lol) Can someone look at the errors on the attached file and let me know what I need to do to correct it. (Its not the one with 278 errors as it says its too large so I uploaded the smaller page) ride-out-gallery.html
  18. I was looking through some ways to validate email. I saw the one on w3schools, but that is a basic one, so I started to code something more complicated adding all those if, else if, else statements, etc. Then I came across this... function validateEmail(email){var allowed=/^([a-zA-Z0-9._-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,4}$)/; return allowed.test(email);} Is something that simple sufficient enough? Everything seems to look as if it would work. Also, what does the "$" do?
  19. just noticed that some code I was having trouble with ended up not validating. http://www.w3schools...put_type_hidden this is some sample code to showcase the hidden input types If you put in this code <?xml version="1.0" encoding="utf-8" ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <form action="form_action.asp" method="get"> Email: <input type="text" name="email" /><br /> <input type="hidden" name="country" value="Norway" /> <in
  20. Hi I'm quite new to web design & development and I would like some information about Dreamweaver basicly and about web, because I'm a little bit confused, if its possible please. First, about form validation using the spry fields. What I mean is, lets say that I have a field in a form for Name and I want to prevent users entering in this field numbers or anything else, but only letters-characters. So can I edit the validate of the field using for example regular expressions (javascript and php) and if its possible where can I do that ?? Second, when I create a query in Dw through the bi
  21. Hi,I made a website --> http://www.pgum-sill.pl/nowa_strona/index.html In Chrome it looks as it should. But in Firefox and IE it is not.What should I change to make the website to look ok in every browser?What I shouldn't use to avoid this kind of situation? I have already checked the code of HTML and CSS file in w3 validator. Everything is correct.
  • Create New...