Search Results

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

Page 74/107 | < Previous Page | 70 71 72 73 74 75 76 77 78 79 80 81  | Next Page >

  • Possible to fire asp.net validation from jQuery?

    - by Abe Miessler
    I have a form with several text boxes on it. I only want to accept floats, but it is likely that users will enter a dollar sign. I'm using the following code to remove dollar signs and validate the content: jQuery: $("#<%= tb.ClientID %>").change(function() { var ctrl = $("#<%= tb.ClientID %>"); ctrl.val(ctrl.val().replace('$','')) }); asp.net validation: <asp:CompareValidator ID="CompareValidator4" runat="server" Type="Double" ControlToValidate="tb" Operator="DataTypeCheck" ValidationGroup="vld_Page" ErrorMessage="Some error" /> My problem is that when someone enters a dollar sign in the TextBox "tb" and changes focus the validation happens first and THEN the jQuery removes the dollar sign. Is it possible to have the jQuery run first or to force the validation to run again after the jQuery executes?

    Read the article

  • script validation error

    - by Kyle Sevenoaks
    Hi, there is a script in my html tag <script type="text/javascript"> function setTaxDisplay(display) { window.location.href += (window.location.href.indexOf('?') > -1 ? '&' : '?') + 'taxInclude=' + display; } </script> When passed to validation It returns that the ampersand there isn't valid, but it's absolutely vital to the function of the page, is there a way I can make the validator ignore this? I don't need to validate the page, I'm no JS expert at all I'm not sure if I can replace it with &amp;. Thanks.

    Read the article

  • jquery ajax call errors in chrome onenter with no responseText

    - by wham12
    I've built a login page that uses a .ajax call to a generic c# handler (.ashx) to validate the username and password before allowing the user to log in. If you click on the login link <a href="#" class="ui-state-default ui-corner-all CustomButton" onclick="goLogin();return false"> the .ajax call returns successfully and it logs the user in. I am trying to make it so the user can also just press the "enter" key from the password box: $("#pword").keydown(function(e) { if (e.keyCode == 13) { goLogin(); } }); Using Firefox, both ways work just fine and the user is logged in. With Chrome however, pressing "enter" hits the error function of my .ajax call and will not log the user in. The parameters and responses look identical through Firefox's console, as expected. What would be causing this and/or how can I debug it in Chrome?

    Read the article

  • Appending html code to a section inside a dialog window isn't working in IE6

    - by user338413
    I'm using jQuery's validation on a form. When the form is validated, I'm using a submitHandler to fill a dialog with data from the form then I open the dialog to display it. Works great except for in IE6. Nothing displays. I've tried initializing the dialog before and after running the validation code but neither makes a difference. Here's the validation code: $("#acct").validate({ ... submitHandler: function() { fillVerificationDialog(); $("#verification_dialog").dialog('open'); return false; } }); Here's the fillVerificationDialog: function fillVerificationDialog() { $("#dialog-data").empty(); $("<span class='label'>").text("First Name: ").appendTo("#dialog-data"); $("<span class='value'>").text($("#firstname").val()).appendTo("#dialog-data"); $("<br/>").appendTo("#dialog-data"); ... }

    Read the article

  • How can I check with a regex that a string contains only certain allowed characters?

    - by Camran
    I need a special regular expression, have no experience in them whatsoever so I am turning to you guys on this one: I need to validate a classifieds title field so it doesn't have any special characters in it, almost. Only letters and numbers should be allowed, and also the swedish three letters å, ä, ö, and also not case sensitive. Besides the above, these should also be allowed: The "&" sign. Parenthesis sign "()" Mathematical signs "-", "+", "%", "/", "*" Dollar and Euro signs One accent signed letter: "é". //Only this one is required Double quote and singel quote signs. The comma "," and point "." signs Thanks

    Read the article

  • Get an Entity in Save Method, What is correct form ?

    - by Felipe
    Hi everybody I'm begginer in asp.net mvc and i have some doubts. P.S: I'm using DDD to learn I have an ACtion in a Controller and it'll save an entity (from my model) by a repository (for a database). My doubts is, How can I get the informations from the View and save it by a repository in my Controller ? Is it correct to get an entity of my Model in Save method of controller, like this: public ActionResult Save(Product product) { // validate object // save data in repository return View("Success"); } Or Need I get an DTO (with a structure similar to my entity) and create an object passing property by property to an entity ? I didnt' like of FormCollection and I'd like to know, What is recommended architecturally ? Thanks a lot guys Cheers

    Read the article

  • Howto check if a object is connected to another in hibernate

    - by codevourer
    Imagine two domain object classes, A and B. A has a bidirectional one-to-many relationship to B. A is related to thousands of B. The relations must be unique, it's not possible to have a duplicate. To check if an instance of B is already connected to a given instance of A, we could perform an easy INNER JOIN but this will only ensure the already persisted relations. What about the current transient relations? class A { @OneToMany private List<B> listOfB; } If we access the listOfB and perform a check of contains() this will fetch all the connected instances of B lazy from the datasource. I only want to validate them by their primary-key. Is there an easy solution where I can do things like "Does this instance of A is connected with this instance of B?" Without loading all these data into memory and perform a based on collections?

    Read the article

  • Looking for alternatives to the database project.

    - by Dave
    I've a fairly large database project which contains nine databases and one database with a fairly large schema. This project takes a large amount of time to build and I'm about to pull my hair out. We'd like to keep our database source controlled, but having a hard getting the other devs to use the project and build the database project before checking in just because it takes so long to build. It is seriously crippling our work so I'm look for alternatives. Maybe something can be done with Redgate's SQL Compare? I think maybe the only drawback here is that it doesn't validate syntax? Anyone's thoughts/suggestions would be most appreciated.

    Read the article

  • Webhook data for Orders Paid

    - by David Lazar
    A client recently requested some fancy processing based off of the Gateway attribute registered with a Paid order. When I receive, validate and inspect the JSON of the order, I am logging the gateway attribute and finding it is nil at times. When I check the order using the API after the Webhook, the gateway attribute is present and matches the one rendered in the Shop admin. Is there an explanation for why the gateway can at times be nil? This prevents me from taking care of the client's requested processing.

    Read the article

  • how to effectively keep/update postal and telephone code format for each country?

    - by melaos
    hi there, currently we have a table for regex format for phone and postal code for countries that we use to validate when the user register through our forms. but the problem remains on the maintenance on the correctness of these format, thus what's a good way to ensure that we always have the latest copy of this information? is there a web service/etc that i can use to get this? or does it even make sense to keep all these format but instead use a relaxed method to ensure that the user just keys in something which roughly matches the format? the information is used solely for shipping and billing address. we're using asp.net 2.0 btw. thanks ~steve

    Read the article

  • Validating single form field with CodeIgniter

    - by iamdadude
    Is there a quick way to validate a single form field with CodeIgniter to see whether or not that field matches a set of rules? There's the $this-form_validation-run();, but that will return either TRUE or FALSE for the whole form, and that's just not what I'm looking for. For example, if I only wanted to check if the email was valid, checking the whole form is not going to get me the result I'm looking for. I looked through the documentation but couldn't find anything like $this-form_validation-run(); that accepts one parameter and returns TRUE or FALSE if it's valid.

    Read the article

  • read pair of characters separated by \t c++

    - by Kiran
    Friends, I want to read a pair of characters separated by \t. I want to continue reading the input until user enters z for any of the characters. Here are the options I thought: while (cinch1ch2) { // process ch1 & ch2 } std::string str; while (getline(cin, str) ){ //split string } Also, I want to validate the input to make sure that it is correct. Please suggest the best way. If this is a duplicate, please point me to the right one. Thanks.

    Read the article

  • PHP Security checklist (injection, sessions etc)

    - by NoviceCoding
    So what kind of things should a person using PHP and MySql be focused on to maximize security. Things I have done: -mysql_real_escape_string all inputs -validate all inputs after escaping em -Placed random alpha numerics before my table names -50character salt + Ripemd passwords Heres where I think I am slacking: -I know know nothing about sessions and securing them. How unsafe/safe is it if all you are doing is: session_start(); $_SESSION['login']= $login; and checking it with: session_start(); if(isset($_SESSION['login'])){ -I heard something about other forms of injection like cross site injection and what not... -And probably many other things I dont know about. Is there a "checklist"/Quicktut on making php secure? I dont even know what I should be worried about.I kinda regret now not building off cakephp since I am not a pro.

    Read the article

  • any ways saving user information without db

    - by hguser
    Hi: I have a application which require login,but the number of user who use the application is no more than 40. And In the application,I get some data from the sql server database where I juse have read permission,also I can not create a table in the db for user validate. ALso I do not think it is a good idea to create a user table in other database on another machine.(for example,I can create a user table in the mysql another machine,but is it desireable just for user validating)? Now I just save the user info in a .properties file,any other good idea? BTW,the programe language used in my application is java.

    Read the article

  • 3 step validation with dataannotations

    - by molgan
    Hello I'm trying to build a "wizard-like" app that has 3 pages. First one you fill in some requests, then you select time and date, and last step is to fill in your name and address etc. How should the validation be taken care of, since I also need to validate all "3 steps" when pressing submit on the last step. Do I need to have 4 viewmodels there? like step1model, step2model...... and then validateallmodel? And must I use some session-like in between since it "redirect's" to next step if successful? /M

    Read the article

  • improve my jquery validation plugin code

    - by Jared
    Hi All Just hoping soemone can help me to write better code than I can come up with on my own. I am using the jquery validation plugin. I have some fields that are mandatory ONLY if certain options are chosen. The below code works fine. But the thing is, is that that my list of 'OR's is much longer than I've put here. and it needs to be applied not just to 'directorsName' but a whole long list of inputs, selects etc. My question is.. how can I wrap up the code contained inside the RETURN? (so I dont have to keep repeating my 'OR's. I'm guessign I need a function but I'm unsure of the syntax) $("#myForm").validate({ rules: { directorsName : { required: function(element) { return ( $('#account_for').val() == "Joint" || $('#directors_number').val() == "2" || $('#directors_number').val() == "3" ); } } } }); Thanks in advance

    Read the article

  • Writing WCF messages to a text log in configurable directory.

    - by Arsh
    Hello everyone, I have a WCF web service that is deployed at IIS. Part of the web service is to validate the inputs using EntLib 4.1 For ex, the string values can be of specific length and so on. In case of the validation being failed a fault exception is raised and the service is supposed to write the message in log file. How do I go about creating the log file to a location that can be configured from a config file. Basically how do we write messages from IIS (since the service is hosted at IIS, I am assuming that that will be the source !!!!) Regards.

    Read the article

  • Custom Rails Validation (Doesn't seem to be working)

    - by Karl Entwistle
    Hey guys ive got the following Model for Accounts require 'net/http' require 'uri' require 'date' class Account < ActiveRecord::Base validates_presence_of :username, :password, :on => :update validate :valid_expiry_date, :on => :update def valid_expiry_date reply = Net::HTTP.get URI.parse("http://api.rapidshare.com/cgi-bin/rsapi.cgi?sub=getaccountdetails_v1&type=prem&login=" + username + "&password=" + password) account = Time.at(reply[80..90].to_i) if (Time.now + 2419200) <= account return true else return false errors.add_to_base("Sorry this account isnt valid") end end end I know the code works in a ruby.rb file and will return true or false, however I seem to be having rather a lot of difficultly trying to translate this code into an actual validation, any help would be much appreciated. Thanks :) Its also defiantly at least connecting to the website as my firewall asked me if the Terminal was aloud to access it. At the moment not only is it displaying no errors its actually letting anything through and saving it.

    Read the article

  • What object called a method in Obj-C

    - by Loz
    Hi, I am looking to write a plugin controller in Cocoa that loads bundles, and exposes a specific set of methods for the plugins to call. My question is this: is it possible to know (any) info about the object that called a method in the controller. When an instantiated plugin calls a method in my plugin controller, I would like to know which of the plugin instances called the method, without having to rely on the plugin sending a pointer to itself as a parameter (I could always validate the pointer they send, but I want to keep the API methods as simple as possible). There may be no perfect solution (and there are simple workarounds), but it's always good to learn some new tricks if possible (or the reasons why it's impossible). Thanks in advance.

    Read the article

  • How to fix Eclipse validation error "No grammar constraints detected for the document"?

    - by Casey
    Eclipse 3.5.2 is throwing an XML schema warning message: No grammar constraints (DTD or XML schema) detected for the document. The application.xml file: <?xml version="1.0" encoding="UTF-8"?> <application xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/application_5.xsd" version="5"> </application> I do not want to disable the warning. How can I get Eclipse to correctly validate the XML document?

    Read the article

  • Is there a "dual user check-in" source control system?

    - by Zubair
    Are there any source control systems that require another user to validate the source code "before" it can be checked-in? I want to know as this is one technique to make sure that code quality is high. Update: There has been talk of "Branches" in the answers, and while I feel branches have there place I think that branchs are something different as when a developer's code is ready to go into the main branch it "should" be checked. Most often though I see that when this happens a lead developer or whoever is responsible for the merge into the main branch/stream just puts the code into the main branch as long as it "compiles" and does no more checks than that. I want the idea of two people putting their names to the code at an early stage so that it introduces some responsibility, and also because the code is cheaper to fix early on and is also fresh in the developers mind.

    Read the article

  • How to change PHP's eregi to preg_match

    - by jasondavis
    I need help, below is a small VERY basic regex to somewhat validate an email, I do realize it does not work the greatest but for my needs it is ok for now. It currently uses PHP's eregi function which php.net says is now a depreciated function and I should use preg_match instead, simply replacing erei with preg_match does not work, can someone show me how to make it work? function validate_email($email) { if (!eregi("^[[:alnum:]][a-z0-9_.-]*@[a-z0-9.-]+\.[a-z]{2,4}$", $email)) { echo 'bad email'; } else { echo 'good email'; } } function validate_email($email) { if (!preg_match("^[[:alnum:]][a-z0-9_.-]*@[a-z0-9.-]+\.[a-z]{2,4}$", $email)) { echo 'bad email'; } else { echo 'good email'; } }

    Read the article

  • When implementing the ICallbackEventHandler in asp.net, in my c# function the RegularExpressionValid

    - by Mausimo
    Hello, As the question states, i have implemented my first ICallbackEventHandler. In my c# callback function i use: Page.Validate("ENewsLetter2"); if (Page.IsValid) { if (!RegularExpressionValidatorEmail.IsValid) { sInvalidMessage += "Invalid E-Mail address.\n"; } return sInvalidMessage; } everytime i check the RegularExpressionValidatorEmail, the value is = "". I do not know if this is since the iCallbackEventHandler is asynchronous, the validator has not talked to the server yet so the value will always show up blank? Is it impossible to do what i am trying to do by using a iCallbackEventHandler?

    Read the article

  • Needed inputs for helping hospitals/practices save money on mandatory compliance Policies and Course

    - by user363414
    Recently one of my clients came up to me and asked "Is there any way we can save some money on mandatory compliance policies and courses, and I started wondering what can I do? I started creating a calculator to show some savings if they used elearning. I wanted your input to validate that data. How many Policies your practice/hospital need to sign and average number of pages per policy? Also how many employees need to sign these policies? This would be really helpful and once I have this done I will send a copy to you as well.

    Read the article

  • EntityFramework how to Override properties

    - by plotnick
    I've just started using EF in VS2010. That thing is just amazin'. I frankly can't understand something. For example I have EntityType with property, they generated from database structure. Now, I have to simply override that property in my code. I don't need to save value of the property back into DB, but everytime when it gets read from DB it should be substituted with run-time calculated value. Of course I can create derived class based on my EntityType but I've tried and found kinda difficulties, I'm not sure this is kinda right way to do. Anyway even when I try to change the whole EntityType to Abstract, damn Visual Studio doesn't want to validate that and says something like: "Error 2078: The EntityType 'AssetsModel.Asset' is Abstract and can be mapped only using IsTypeOf." "Error 2063: At least one property must be mapped in the set mapping for 'Assets'" What the hell is this suppose to mean I dunno.. Any ideas gentlemen?

    Read the article

< Previous Page | 70 71 72 73 74 75 76 77 78 79 80 81  | Next Page >