Search Results

Search found 2674 results on 107 pages for 'validate'.

Page 3/107 | < Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • jQuery Validate - Require at least one from group, plus additional items.

    - by Kevin Pullin
    I'm attempting to use 'jQuery Validate' on a form that requires an email address plus either all items of a shipping address completed or none at all. Using the sample provided by the solution to this question: jQuery Validate - “Either skip these fields, or fill at least X of them”, I have been able to successfully solve the validation of the address group. The problem, however, is that the logic for validating the email address field does not work. From debugging the Validate scripts, the "re-entrant" validation code triggered by calling 'fields.data('being_validated', true).valid();' in the linked example results in a reset of all previously validated errors (i.e. the email validation error is cleared). I have modified some existing samples, the first in which removes the offending line and the second with it included. Email Validation Working Email Validation Fails Any tips or suggestions on how to properly solve this or work around the failure?

    Read the article

  • How do I disable "eager" validation entirely using jquery validate ?

    - by Kevin J
    Is there a way to disable "eager" validation using the jquery.validate plugin? Either through an option in the script or as a hack? "Eager" validation kicks in once the form has been validated once - after that, invalid fields are validated onfocusout. I want to disable this behavior, and change my forms to only be validated when the submit button is pressed. I don't mind hacking through the validate script itself also, so if that's what the solution requires that's acceptable.

    Read the article

  • How to get TinyMCE and Jquery validate to work together?

    - by chobo2
    Hi I am using jquery validate and the jquery version of tinymce. I found this piece of code that makes tinymce to validate itself every time something changes in it. Hi I am using the jquery validate with my jquery tinymce so I have this in my code // update validation status on change onchange_callback: function (editor) { tinyMCE.triggerSave(); $("#" + editor.id).valid(); }, This works however there is one problem. If a user copies something from word it brings all that junk styling with it what is usually over 50,000 characters. This is way over my amount of characters a user is allowed to type in. So my jquery validation method goes off telling me that they went over the limit. In the mean time though tinymce has cleaned up that mess and it could be possible now the user has not gone over the limit. Yet the message is still there. So is there a better function call I can put this in? Maybe tell tinymce to delay the valid when a paste is happening, or maybe a different callback? Anyone got any ideas?

    Read the article

  • How to make placeholder varablies in jquery validate 1.7?

    - by chobo2
    Hi I am using jquery 1.4.2 and jquery validate 1.7(http://bassistance.de/jquery-plugins/jquery-plugin-validation/) Say I have this example that I just grabbed off some random site(http://www.webreference.com/programming/javascript/jquery/form_validation/) 8 <script type="text/javascript"> 9 $(document).ready(function() { 10 $("#form1").validate({ 11 rules: { 12 name: "required",// simple rule, converted to {required:true} 13 email: {// compound rule 14 required: true, 15 email: true 16 }, 17 url: { 18 url: true 19 }, 20 comment: { 21 required: true 22 } 23 }, 24 messages: { 25 comment: "Please enter a comment." 26 } 27 }); 28 }); 29 </script> now is it possible to do something like this 10 $("#form1").validate({ var NameHolder = "name" 11 rules: { 12 NameHolder: "required",// simple rule, converted to {required:true} 13 email: {// compound rule 14 required: true, 15 email: true So basically I want to make sort of a global variable to hold theses rule names( what correspond to the names on that html control). My concern is the names of html controls can change and it kinda sucks that I will have to go around and change it in many places of my code to make it work again. So basically I am wondering is there away to make a global variable to store this name. So if I need to change the name I only have to change it in one spot in my javascript file sort of the way stopping magic numbers ?

    Read the article

  • How to use JQuery Validate to create a popup with all form error when the submit button is clicked?

    - by Larry
    I am using the JQuery Validation plugin for client side form validation. In addition to the colorful styling on invalid form fields, my client requires that a popup message be shown. I only want to show this message when the submit button is click because it would drive the user crazy otherwise. I tried the following code, but errorList is always empty. Anyone know the correct way to do something similar. function popupFormErrors(formId) { var validator = $(formId).validate(); var message = ''; for (var i = 0; i < validator.errorList.length - 1; i++) { message += validator.errorList[i].message + '\n'; } if (message.length > 0) { alert(message); } } $('#btn-form-submit').click(function(){ $('#form-register').submit(); popupFormErrors('#btn-form-submit'); return false; }); $('#form-register').validate({ errorPlacement: function(error, element) {/* no room on page */}, highlight: function(element) { $(element).addClass('invalid-input'); }, unhighlight: function(element) { $(element).removeClass('invalid-input'); }, ... }); Update From the info in the accepted answer I came up with this. var submitClicked = false; $('#btn-form-submit').click(function() { submitClicked = true; $('#form-register').submit(); return false; }); $('#form-register').validate({ errorPlacement: function(error, element) {/* no room on page */}, highlight: function(element) { $(element).addClass('invalid-input'); }, unhighlight: function(element) { $(element).removeClass('invalid-input'); }, showErrors: function(errorsObj) { this.defaultShowErrors(); if (submitClicked) { submitClicked = false; ... create popup from errorsObj... } } ... });

    Read the article

  • Finding the XPath with the node name

    - by julien.schneider(at)oracle.com
    A function that i find missing is to get the Xpath expression of a node. For example, suppose i only know the node name <theNode>, i'd like to get its complete path /Where/is/theNode.   Using this rather simple Xquery you can easily get the path to your node. declare namespace orcl = "http://www.oracle.com/weblogic_soa_and_more"; declare function orcl:findXpath($path as element()*) as xs:string { if(local-name($path/..)='') then local-name($path) else concat(orcl:findXpath($path/..),'/',local-name($path)) }; declare function orcl:PathFinder($inputRecord as element(), $path as element()) as element(*) { { for $index in $inputRecord//*[local-name()=$path/text()] return orcl:findXpath($index) } }; declare variable $inputRecord as element() external; declare variable $path as element() external; orcl:PathFinder($inputRecord, $path)   With a path         <myNode>nodeName</myNode>  and a message         <node1><node2><nodeName>test</nodeName></node2></node1>  the result will be         node1/node2/nodeName   This is particularly useful when you use the Validate action of OSB because Validate only returns the xml node which is in error and not the full location itself. The following OSB project reuses this Xquery to reformat the result of the Validate Action. Just send an invalid xml like <myElem http://blogs.oracle.com/weblogic_soa_and_more"http://blogs.oracle.com/weblogic_soa_and_more">      <mySubElem>      </mySubElem></myElem>   you'll get as nice <MessageIsNotValid> <ErrorDetail  nbr="1"> <dataElementhPath>Body/myElem/mySubElem</dataElementhPath> <message> Expected element 'Subelem1@http://blogs.oracle.com/weblogic_soa_and_more' before the end of the content in element mySubElem@http://blogs.oracle.com/weblogic_soa_and_more </message> </ErrorDetail> </MessageIsNotValid>   Download the OSB project : sbconfig_xpath.jar   Enjoy.            

    Read the article

  • Using jquery validate with multiple fields of the same name

    - by Matt H
    I am trying to get jquery validate to work on multiple fields. Reason being I have dynamically generated fields added and they are simply a list of numbers. So I thought I'd put together a basic example and followed the concept from the accepted answer in the following link: http://stackoverflow.com/questions/931687/using-jquery-validate-plugin-to-validate-multiple-form-fields-with-identical-name However, it's not doing anything useful. Why is it not working? <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <script src="http://code.jquery.com/jquery-latest.js"></script> <script type="text/javascript" src="http://dev.jquery.com/view/trunk/plugins/validate/lib/jquery.delegate.js"></script> <script type="text/javascript" src="http://dev.jquery.com/view/trunk/plugins/validate/jquery.validate.js"></script> <script> $("#submit").click(function(){ $("field").each(function(){ $(this).rules("add", { required: true, email: true, messages: { required: "Specify a valid email" } }); }) }); $(document).ready(function(){ $("#myform").validate(); }); </script> </head> <body> <form id="myform"> <label for="field">Required, email: </label> <input class="left" id="field" name="field" /> <input class="left" id="field" name="field" /> <input class="left" id="field" name="field" /> <input class="left" id="field" name="field" /> <br/> <input type="submit" value="Validate!" id="submit" name="submit" /> </form> </body> </html>

    Read the article

  • How To Validate an Email Address

    - by Richard Jones
    I’m using my blog today as book mark service today. I just found this article on howto really validate if an email address exists. I’ll have a go at wrapping this article into a WCF/Webservice http://www.webdigi.co.uk/blog/2009/how-to-check-if-an-email-address-exists-without-sending-an-email/

    Read the article

  • Validate Data Binding with Silverlight 3

    In this fourth part of the series we will take a look at how to validate data binding. We ll start by explaining why this is important and then walk through a step-by-step process that shows you how to do it. The next and final part of the series will discuss data conversion.... Test Drive the Next Wave of Productivity Find Microsoft Office 2010 and SharePoint 2010 trials, demos, videos, and more.

    Read the article

  • Is there any way to validate the Open Graph protocol meta tags for Facebook integration?

    - by John
    Is there any way to validate the Facebook Open Graph protocol meta tags in the head section of my website? Code below. <meta property="og:title" content="my content" /> <meta property="og:type" content="company" /> <meta property="og:url" content="http://mycompany.com/" /> <meta property="og:image" content="http://mycompany.com/image.png" /> <meta property="og:site_name" content="my site name" /> <meta property="fb:admins" content="my_id" /> <meta property="og:description" content="my description" /> -edit- I mean validating the html. Sorry for the confusion! Right now my site isn't valid because of these tags.

    Read the article

  • Methods to Validate User Supplied Data

    - by clifgray
    I am working on a website where users record data from certain locations and they input an address to tag that location with a GPS coordinate. Pretty frequently those locations are tagged more than a mile away from the actual location and I am trying to implement a few ways to validate the data. Right now I am thinkiing of: having a tag of location pages for other users to say "incorrect location" so I can go one by one and fix it letting users with a decent amount of experience (reputation) edit the location GPS coordinates making the location be validated by a mod before it goes live and they make sure it is a good location Are these reasonable? I know the first will take a lot of my time and I would love some suggestions.

    Read the article

  • Use MD5 to validate the exchanged files between Oracle and Customer

    - by Jie Chen
    Oracle Supports may ask customers to upload some data files (Database Dump, Trace Log, etc) for research. We often see the scenario that the uploaded huge files are corrupted and have to ask to re-upload. Then we may waste much time during this period. To avoid this, customers can tell Support the MD5 checksum of the upload files, requesting support to validate same if they have gotten the correct file in good format. MD5 on Linux We can use "md5sum" command directly. For example we calculate the file PrintManager.class MD5 checksum value. [jijichen@jclinux temp]$ md5sum PrintManager.class e0bf8c7623240ccd15ee17c0478427a1 PrintManager.class MD5 on Windows There are many freeware to calculate MD5 on internet. For example we can use WinMD5Free tool. You can download it from here. http://www.winmd5.com https://blogs.oracle.com/jiechen/resource/2013/winmd5free.zip

    Read the article

  • How do I use jquery validate remote validation on a field that depends on another field in the form?

    - by Kevin J
    I have a form in which I am using remote validation to check if an email address already exists in the database. However, the catch is that on this form, the user can select between several different "groups", and each group has its own distinct set of email addresses (thus the same email can exist once in each group). The group selection is a dropdown on the form, and the email address is an input field with remote validation. I have a couple issues. First, I have set up my remote rule like this: remote: { url: 'remote_script.php', data: { group_id: $('select.group_id').val() } } However, this seems to statically set the group_id parameter to whatever the first value in the select is. Meaning, if I change the select, then trigger the remote validation again, the group_id parameter does not change First, how can I make this parameter dynamic, depending on the value of a select in the form? Secondly, how do I manually trigger the remote validation on the email address field? When the group_id select is changed, I want to re-trigger the remote validation on the email address field (without changing the value of the field). I tried using $(selector).validate().element('.email_addr') But this appears to only trigger the standard validation (required, email), and not the remote call.

    Read the article

  • Haskell: Best tools to validate textual input?

    - by Ana
    In Haskell, there are a few different options to "parsing text". I know of Alex & Happy, Parsec and Attoparsec. Probably some others. I'd like to put together a library where the user can input pieces of a URL (scheme e.g. HTTP, hostname, username, port, path, query, etc.) I'd like to validate the pieces according to the ABNF specified in RFC 3986. In other words, I'd like to put together a set of functions such as: validateScheme :: String -> Bool validateUsername :: String -> Bool validatePassword :: String -> Bool validateAuthority :: String -> Bool validatePath :: String -> Bool validateQuery :: String -> Bool What is the most appropriate tool to use to write these functions? Alex's regexps is very concise, but it's a tokenizer and doesn't straightforwardly allow you to parse using specific rules, so it's not quite what I'm looking for, but perhaps it can be wrangled into doing this easily. I've written Parsec code that does some of the above, but it looks very different from the original ABNF and unnecessarily long. So, there must be an easier and/or more appropriate way. Recommendations?

    Read the article

  • Validate that a Checkbox is checked using javascript

    - by H(at)Ni
    I was facing a challenge yesterday that I was creating a Visual webpart and I wanted to validate the a submit button is only visible if the user checked a "I agree to terms" checkbox. Something was weired that I tested my code on a normal asp.net website and it worked perfectly while it had a different behaviour inside the webpart which is whenever I check the checkbox, the button is enabled but it will not fire the asp.net validators in client side. It posts back the page and then the validators appear after that. So, I tried to change my type of thinking and I reached a different solution is that to call a javascript function whenever the button is clicked and then check if the checkbox is clicked or not. To illustrate more, here are an example to what I'm saying: 1. Button in aspx page: <asp:Button OnClientClick="CheckForCondition();"  ValidationGroup="CompaniesSection" ID="btnCompaniesSubmit"                         runat="server" Text="Submit" /> 2. CheckForCondition() function: <script language="javascript" type="text/javascript">                         function CheckForCondition() {                             if ($jq('#<%= ChkCompanyCheck.ClientID %>:checked').val() == undefined) {                                 $jq('#lblCheckBox').show();                                 return false;                             }                             else {                                 $jq('#lblCheckBox').hide();                                 return true;                             }                         }                      </script> 3. lblCheckBox is simply a label that shows a red asterisk beside the checkbox to indicate that it's a required field. <label id="lblCheckBox" style="color:Red;display:none">*</label>

    Read the article

  • Validate if aTextBox Value Start with a Specific Letter

    - by Vincent Maverick Durano
    In case you will be working on a page that needs to validate the first character of the TextBox entered by a user then here are two options that you can use: Option 1: Using an array   1: <asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server"> 2: <script type="text/javascript"> 3: function CheckFirstChar(o) { 4: var arr = ['A', 'B', 'C', 'D']; 5: if (o.value.length > 0) { 6: for (var i = 0; i < arr.length; i++) { 7: if (o.value.charAt(0) == arr[i]) { 8: alert('Valid'); 9: return true; 10: } 11: else { 12: alert('InValid'); 13: return false; 14: } 15: } 16: } 17: } 18: </script> 19: </asp:Content> 20: <asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server"> 21: <asp:TextBox ID="TextBox1" runat="server" onblur="return CheckFirstChar(this);"></asp:TextBox> 22: </asp:Content>   The example above uses an array of string for storing the list of  characters that a TextBox value should start with. We then iterate to the array and compare the first character of TextBox value to see if it matches any characters from the array. Option 2: Using Regular Expression (Preferred way)   1: <asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server"> 2: <script type="text/javascript"> 3: function CheckFirstChar(o) { 4: pattern = /^(A|B|C|D)/; 5: if (!pattern.test(o.value)) { 6: alert('InValid'); 7: return false; 8: } else { 9: alert('Valid'); 10: return true; 11: } 12: } 13: </script> 14: </asp:Content> 15: <asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server"> 16: <asp:TextBox ID="TextBox1" runat="server" onblur="return CheckFirstChar(this);"></asp:TextBox> 17: </asp:Content>   The example above uses regular expression with the pattern  /^(A|B|C|D)/. This will check if the TextBox value starts with A,B,C or D. Please note that it's case sensitive. If you want to allow lower case then you can alter the patter to this /^(A|B|C|D)/i. The i in the last part will cause a case-insensitive search.   That's it! I hope someone find this post useful!

    Read the article

  • C# window application : How to validate mobile no.

    - by SAMIR BHOGAYTA
    //First : Simple Method private void textBox1_KeyPress(object sender, KeyPressEventArgs e) { if (char.IsDigit(e.KeyChar) == true) { if (textBox1.Text.Length 10) { MessageBox.Show("Invalid Indian Mobile Number !!"); txtPhone.Focus(); } } //With the help of JavaScript function phone_validate(phone) { var phoneReg = ^((\+)?(\d{2}[-]))?(\d{10}){1}?$; if(phoneReg.test(phone) == false) { alert("Phone number is not yet valid."); } else { alert("You have entered a valid phone number!"); } }

    Read the article

  • How to validate a xml schema

    - by Alexander Kjäll
    I'm writing a xml schema (a xsd) to describe the format our partners should send us data in. And I'm havening a hard time find a tool that can validate the xsd file that i have written. The best way I have found so far is to write an example input xml file and try to validate that with the xsd. But that doesn't feel like a best practice maneuver. How should I validate a xml schema?

    Read the article

  • jQuery Validate Plugin overwrite my select onChange postback

    - by C.Hoffmann
    Hi, I'm creating this form (.net) where i have a select with a postback, that will trigger a action depending on which option i select. I'm trying to use the jQuery Validate Plugin (plugin website) to validate my form. My problem is, when i validate the form, and my select is marked as invalid, the validation plugin overwrite it's onChange method to make it unmark when i change the value, the thing is that it's deleting my __dopostback from the onchange, making the form 'useless'. Is there a way to the plugin validate my selects without deleting my postback action from the onchange?

    Read the article

< Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >