Search Results

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

Page 9/107 | < Previous Page | 5 6 7 8 9 10 11 12 13 14 15 16  | Next Page >

  • How to Validate Pasted Dates in Excel

    - by jimdrang
    I want to validate pasted dates to remove /'s and ensure the year is 4 digits and when users paste them in it overwrites my excel validation. So, If a user pastes 05/19/10 into a cell, I would like it to convert to 05192010 or at least give an error if this is not possible. I don't know enough VB to add sheet-wide code that does this and I'm not sure if it would work when users paste multiple cells at a time.

    Read the article

  • AS3 validate form fields?

    - by show
    Hi, I wrote a AS3 script, i have 2 fields to validate, i.e email and name. For email i use: function isValidEmail(Email:String):Boolean { var emailExpression:RegExp = /^[a-z][\w.-]+@\w[\w.-]+.[\w.-]*[a-z][a-z]$/i; return emailExpression.test(Email); } How about name field? Can you show me some sample code? EDIT: Invalid are: blank between 4 - 20 characters Alphanumeric only(special characters not allowed) Must start with alphabet

    Read the article

  • Validate site/domain via javascript

    - by Chez
    I have a standard html form where the user can specify a website/domain: favourite website: [ ] I expect the user to type things like: [www.google.com] [www.yahoo.com] [www.example.co.jp] I want to validate the domain/site via javascript so if a user had typed something wrong: [www...google.com] [www.-example.com] I tell them straight away. Can anybody post this javascript ? Alternatively can anybody point me to a site where I can look at their javascript ? Many Thanks

    Read the article

  • Validate number of nested attributes

    - by Damien MATHIEU
    Hello, I have a model with nested attributes : class Foo < ActiveRecord::Base has_many :bar accepts_nested_attributes_for :bar end It works fine. However I'd want to be sure that for every Foo, I have at least two Bar. I can't access the bar_attributes in my validations so it seems I can't validate it. Is there any clean way to do so ?

    Read the article

  • RequiredFieldValidator to validate a disabled textBox

    - by Andrea
    Hi guys, I've got a TextBox in which user can input a their desired username. Underneath I've got a checkbox that once clicked it copies the user's email adress into the textfield and then disable it to prevent further changes. This feature is implemented by using jQuery. The problem is that I've got a RequiredFieldValidator on that TextBox and it looks like it can't validate a disabled textfield, even if the value is set. How can I solve this?

    Read the article

  • Validate HTML entities in JavaScript

    - by Eduard Luca
    I have a small JavaScript validation script that validates inputs based on Regex. I want to allow certain characters that are not exactly common (not sure if they're UTF8). For example I want to allow the following character ’, which looks like a single quote, but isn't. I got the HTML code for this which is &#8217;, but I'm not sure how to put this into the Regex. I've tried just inputting [&#8217]* but it doesn't validate.

    Read the article

  • validate form view and gridview at the same form

    - by Saeed
    i have formview when with tow required validator and gridview with reqired validator when i click insert on form view it fires the validation on the gridview i want when i click inserton form view just validate the tow validators on the form and doesnt fire the validator on gridview

    Read the article

  • How does one validate an entire site?

    - by American Yak
    I realize there's the W3C validator, which works great for one page. There's also the perl install they provide, but it seems to not work on a Mac or it's buggy. Given that 1) I have an entire set of local files How do I a) Validate the entire set b) do it behind a firewall c) do it simply without installing anything on my computer? (i.e., is there a web service?) Or is this just futile?

    Read the article

  • asp.net mvc2 validate type double

    - by ile
    [MetadataType(typeof(Deal_Validation))] public partial class Deal { } public class Deal_Validation { [Required] public string Title { get; set; } public double? EstValue { set; get; } } How to validate EstValue (check if it is of type double?) Thanks

    Read the article

  • JavaScript function to validate an integer value

    - by Psyche
    Hello, I'm building a shopping cart and I would like to use a JavaScript function to validate user input when entering the quantity value in the quantity text input. I would like to allow the entering of integer values only (no floats, no other characters). I know that I can apply this function using onKeyUp event and also I found isNaN() function, but it returns true even for floats (which is not ok). Can you guys help me out with this one? Thanks.

    Read the article

  • How to validate user with SimpleMembership

    - by Rushino
    I am using SimpleMembership for user login stuff in my web application. I wrote a console that actually access my web application classes to avoid duplicate code. However, since my console application doesn't have anything related to user sessions the Login method doesn't work. But is there a way to validate a user only using the SimpleMembership? In case i have to do it manually.. how can i do it ?

    Read the article

  • how to validate

    - by kumar
    I have this Calender Control I am using..user can select any date from the calender.. I need to validate the dates like Saturday and Sundays and 1/1 and 1/25.. if they select these days I need to show them Popup message not valid date? can anybody help me out.. thanks

    Read the article

  • Validate java SAML signature from C#

    - by Adrya
    How can i validate in .Net C# a SAML signature created in Java? Here is the SAML Signature that i get from Java: <ds:Signature xmlns:ds="http://www.w3.org/2000/09/xmldsig#"> <ds:SignedInfo> <ds:CanonicalizationMethod Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"> </ds:CanonicalizationMethod> <ds:SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#rsa-sha1"> </ds:SignatureMethod> <ds:Reference URI="#_e8bcba9d1c76d128938bddd5ae8c68e1"> <ds:Transforms> <ds:Transform Algorithm="http://www.w3.org/2000/09/xmldsig#enveloped-signature"> </ds:Transform> <ds:Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"> <ec:InclusiveNamespaces xmlns:ec="http://www.w3.org/2001/10/xml-exc-c14n#" PrefixList="code ds kind rw saml samlp typens #default xsd xsi"> </ec:InclusiveNamespaces> </ds:Transform> </ds:Transforms> <ds:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"> </ds:DigestMethod> <ds:DigestValue>zEL7mB0Wkl+LtjMViO1imbucXiE=</ds:DigestValue> </ds:Reference> </ds:SignedInfo> <ds:SignatureValue> jpIX3WbX9SCFnqrpDyLj4TeJN5DGIvlEH+o/mb9M01VGdgFRLtfHqIm16BloApUPg2dDafmc9DwL Pyvs3TJ/hi0Q8f0ucaKdIuw+gBGxWFMcj/U68ZuLiv7U+Qe7i4ZA33rWPorkE82yfMacGf6ropPt v73mC0bpBP1ubo5qbM4= </ds:SignatureValue> <ds:KeyInfo> <ds:X509Data> <ds:X509Certificate> MIIDBDCCAeygAwIBAgIIC/ktBs1lgYcwDQYJKoZIhvcNAQEFBQAwNzERMA8GA1UEAwwIQWRtaW5D QTExFTATBgNVBAoMDEVKQkNBIFNhbXBsZTELMAkGA1UEBhMCU0UwHhcNMDkwMjIzMTAwMzEzWhcN MTgxMDE1MDkyNTQyWjBaMRQwEgYDVQQDDAsxMC41NS40MC42MTEbMBkGA1UECwwST24gRGVtYW5k IFBsYXRmb3JtMRIwEAYDVQQLDAlPbiBEZW1hbmQxETAPBgNVBAsMCFNvZnR3YXJlMIGfMA0GCSqG SIb3DQEBAQUAA4GNADCBiQKBgQCk5EqiedxA6WEE9N2vegSCqleFpXMfGplkrcPOdXTRLLOuRgQJ LEsOaqspDFoqk7yJgr7kaQROjB9OicSH7Hhsu7HbdD6N3ntwQYoeNZ8nvLSSx4jz21zvswxAqw1p DoGl3J6hks5owL4eYs2yRHvqgqXyZoxCccYwc4fYzMi42wIDAQABo3UwczAdBgNVHQ4EFgQUkrpk yryZToKXOXuiU2hNsKXLbyIwDAYDVR0TAQH/BAIwADAfBgNVHSMEGDAWgBSiviFUK7DUsjvByMfK g+pm4b2s7DAOBgNVHQ8BAf8EBAMCBaAwEwYDVR0lBAwwCgYIKwYBBQUHAwEwDQYJKoZIhvcNAQEF BQADggEBAKb94tnK2obEyvw8ZJ87u7gvkMxIezpBi/SqXTEBK1by0NHs8VJmdDN9+aOvC5np4fOL fFcRH++n6fvemEGgIkK3pOmNL5WiPpbWxrx55Yqwnr6eLsbdATALE4cgyZWHl/E0uVO2Ixlqeygw XTfg450cCWj4yfPTVZ73raKaDTWZK/Tnt7+ulm8xN+YWUIIbtW3KBQbGomqOzpftALyIKLVtBq7L J0hgsKGHNUnssWj5dt3bYrHgzaWLlpW3ikdRd67Nf0c1zOEgKHNEozrtRKiLLy+3bIiFk0CHImac 1zeqLlhjrG3OmIsIjxc1Vbc0+E+z6Unco474oSGf+D1DO+Y= </ds:X509Certificate> </ds:X509Data> </ds:KeyInfo> </ds:Signature> I know to parse SAML, i need to validate the signature. I tried this: public bool VerifySignature() { X509Certificate2 certificate = null; XmlDocument doc = new XmlDocument(); XmlElement xmlAssertionElement = this.GetXml(doc); doc.AppendChild(xmlAssertionElement); // Create a new SignedXml object and pass it // the XML document class. SamlSignedXml signedXml = new SamlSignedXml(xmlAssertionElement); // Get signature XmlElement xmlSignature = this.Signature; if (xmlSignature == null) { return false; } // Load the signature node. signedXml.LoadXml(xmlSignature); // Get the certificate used to sign the assertion if information about this // certificate is available in the signature of the assertion. foreach (KeyInfoClause clause in signedXml.KeyInfo) { if (clause is KeyInfoX509Data) { if (((KeyInfoX509Data)clause).Certificates.Count > 0) { certificate = (X509Certificate2)((KeyInfoX509Data)clause).Certificates[0]; } } } if (certificate == null) { return false; } return signedXml.CheckSignature(certificate, true); } It validates the signature of a SAML signed in .Net but not of this Java one.

    Read the article

  • How to validate and entry on a datagrid that is bound to an adapter

    - by Ziv
    Hi, I've been using C# for a while and began a program now to learn WPF-which means I know almost nothing of it. I used this tutorial as a guide to do what I wanted to do (which is binding a database to a datagrid), after a hard struggle to add the adapter as the source of the datagrid I now want to enable editing with validation on some of the cells. My problem is that the data is sent straight from the adapter and not through an object collection (I had a hard time getting to this situation, see the first half of the tutorial on how to bind the adapter and dataset through the resources) but the tutorial doesn't show a way to validate the datagrid if the data is sent through an adapter-only through a collection. To make it clear-how do I validate input in a datagrid that is bound to an adapter through a resource? The relevant code: (XAML) <Window.Resources> <ObjectDataProvider x:Key="DiscsDataProvider" ObjectType="{x:Type local:DiscsDataProvider}" /> <ObjectDataProvider x:Key="Discs" ObjectInstance="{StaticResource ResourceKey=DiscsDataProvider}" MethodName="GetDiscs" /> <Style x:Key="CellEditStyle" TargetType="{x:Type TextBox}"> <Setter Property="BorderThickness" Value="0"/> <Setter Property="Padding" Value="0"/> <Setter Property="Background" Value="Yellow"/> <Style.Triggers> <Trigger Property="Validation.HasError" Value="true"> <Setter Property="ToolTip" Value="{Binding RelativeSource={RelativeSource Self}, Path=(Validation.Errors)[0].ErrorContent}"/> </Trigger> </Style.Triggers> </Style> </Window.Resources> For the datagrid: <Grid Width="auto" Height="auto"> <DockPanel DataContext="{Binding Source={StaticResource ResourceKey=Discs}}"> <DataGrid Margin="12,0,0,12" Name="View_dg" HorizontalAlignment="Left" Width="533" Height="262" VerticalAlignment="Bottom" ItemsSource="{Binding}" AutoGenerateColumns="False" CanUserAddRows="False" CanUserDeleteRows="False" CanUserResizeColumns="True"> <DataGrid.Columns> <DataGridTextColumn Binding="{Binding Path=ContainerID}" CanUserReorder="False" CanUserResize="True" CanUserSort="True" EditingElementStyle="{StaticResource CellEditStyle}" IsReadOnly="False" Header="Container" /> <DataGridTextColumn Binding="{Binding Path=ID}" CanUserReorder="False" CanUserResize="True" CanUserSort="True" EditingElementStyle="{StaticResource CellEditStyle}" IsReadOnly="True" Header="ID" /> <DataGridTextColumn Binding="{Binding Path=Title}" CanUserReorder="False" CanUserResize="True" CanUserSort="True" EditingElementStyle="{StaticResource CellEditStyle}" IsReadOnly="False" Header="Title" /> <DataGridTextColumn Binding="{Binding Path=SubTitle}" CanUserReorder="False" CanUserResize="True" CanUserSort="False" EditingElementStyle="{StaticResource CellEditStyle}" IsReadOnly="False" Header="Sub Title" /> <DataGridTextColumn Binding="{Binding Path=Type}" CanUserReorder="False" CanUserResize="True" CanUserSort="True" EditingElementStyle="{StaticResource CellEditStyle}" IsReadOnly="False" Header="Type" /> <DataGridTextColumn Binding="{Binding Path=Volume}" CanUserReorder="False" CanUserResize="True" CanUserSort="False" EditingElementStyle="{StaticResource CellEditStyle}" IsReadOnly="False" Header="Volume" /> <DataGridTextColumn Binding="{Binding Path=TotalDiscs}" CanUserReorder="False" CanUserResize="True" CanUserSort="False" EditingElementStyle="{StaticResource CellEditStyle}" IsReadOnly="False" Header="Total Discs" /> </DataGrid.Columns> </DataGrid> </DockPanel> and C#: public class DiscsDataProvider { private DiscsTableAdapter adapter; private DB dataset; public DiscsDataProvider() { dataset = new DB(); adapter = new DiscsTableAdapter(); adapter.Fill(dataset.Discs); } public DataView GetDiscs() { return dataset.Discs.DefaultView; } }

    Read the article

  • Symfony2: validate an object that is not an entity

    - by Marronsuisse
    I am using CraueFormFlowBundle to have a multiple page form, and am trying to do some validation on some of the fields but can't figure out how to do this. The object that needs to be validated isn't an Entity, which is causing me trouble. I tried adding a collectionConstraint in the getDefaultOption function of my form type class, but this doesn't work as I get the "Expected argument of type array or Traversable and ArrayAccess" error. I tried with annotations in my object class, but they don't seem to be taken into account. Are annotations taken into account if the class isn't an entity? (i set enable_annotations to true) Anyway, what is the proper way to do this? Basically, I just want to validate that "age" is an integer... class PoemDataCollectorFormType extends AbstractType { public function buildForm(FormBuilder $builder, array $options) { switch ($options['flowStep']) { case 6: $builder->add('msgCategory', 'hidden', array( )); $builder->add('msgFIB','text', array( 'required' => false, )); $builder->add('age', 'integer', array( 'required' => false, )); break; } } public function getDefaultOptions(array $options) { $options = parent::getDefaultOptions($options); $options['flowStep'] = 1; $options['data_class'] = 'YOP\YourOwnPoetBundle\PoemBuilder\PoemDataCollector'; $options['intention'] = 'my_secret_key'; return $options; } } EDIT: add code, handle validation with annotations As Cyprian, I was pretty sure that using annotations should work, however it doesn't... Here is how I try: In my Controller: public function collectPoemDataAction() { $collector = $this->get('yop.poem.datacollector'); $flow = $this->get('yop.form.flow.poemDataCollector'); $flow->bind($collector); $form = $flow->createForm($collector); if ($flow->isValid($form)) { .... } } In my PoemDataCollector class, which is my data class (service yop.poem.datacollector): class PoemDataCollector { /** * @Assert\Type(type="integer", message="Age should be a number") */ private $age; } EDIT2: Here is the services implementation: The data class (PoemDataCollector) seems to be linked to the flow class and not to the form.. Is that why there is no validation? <service id="yop.poem.datacollector" class="YOP\YourOwnPoetBundle\PoemBuilder\PoemDataCollector"> </service> <service id="yop.form.poemDataCollector" class="YOP\YourOwnPoetBundle\Form\Type\PoemDataCollectorFormType"> <tag name="form.type" alias="poemDataCollector" /> </service> <service id="yop.form.flow.poemDataCollector" class="YOP\YourOwnPoetBundle\Form\PoemDataCollectorFlow" parent="craue.form.flow" scope="request"> <call method="setFormType"> <argument type="service" id="yop.form.poemDataCollector" /> </call> </service> How can I do the validation while respecting the craueFormFlowBundle guidelines? The guidelines state: Validation groups To validate the form data class a step-based validation group is passed to the form type. By default, if getName() of the form type returns registerUser, such a group is named flow_registerUser_step1 for the first step. Where should I state my constraint to use those validation groups..? I tried: YOP\YourOwnPoetBundle\PoemBuilder\Form\Type\PoemDataCollectorFormType: properties: name: - MinLength: { limit: 5, message: "Your name must have at least {{ limit }} characters.", groups: [flow_poemDataCollector_step1] } sex: - Type: type: integer message: Please input a number groups: [flow_poemDataCollector_step6] But it is not taken into acount.

    Read the article

  • how to validate all but not single pair of input box in jQuery

    - by I Like PHP
    i have a form which have 45 input boxes, i applied jquery validation for all input boxes , but there is two pair of input boxes which have either oneof them should be filled up, not both. so how do i change jquery so that if anyone fill up first pair then jquery does not check second pair of input box and if any one is fill up second pair then not check for fisrt one's and also i have used radio box for showing one pair at a time i show code below: jQuery Code <script type="text/javascript"> $j=jQuery.noConflict(); $j(document).ready(function() { function validate() { return $j("input:text,textarea,select,radio").removeClass('rdb').filter(function() { return !/\S+/.test($j(this).val()); }).addClass('rdb').size() == 0; } $j('#myForm').submit(validate); $j(":input:text,textarea,select").blur(function() { if(this.value.length > 0) { $j(this).removeClass('rdb'); } }); $j("input:radio").click(function(){ if($j(this).val()=='o'){ $j("#rcpt").css("display","none"); $j("#notRcpt").css("display","inline"); } if($j(this).val()=='r'){ $j("#notRcpt").css("display","none"); $j("#rcpt").css("display","inline"); } }); }); </script> PHP Code <form name="myForm" action="somepage.php" method="post" id="myForm"> <table width="100%" border="0" cellspacing="4" cellpadding="0"> <tr> <td class="boxtitle">Delivery Pick up Station/Place</td> <tr> <td style="font:bold 11px verdana;"> <input type="radio" name="receipt" value="r" >Receipt <input type="radio" name="receipt" value="o" >Other </td> </tr> <tr> <td> <table width="100%" border="0" cellspacing="3" cellpadding="0"> <tr id="rcpt" style="display:none"> <td width="12%" align="left">Receipt:</td> <td width="30%" align="left"<input type="text" name="deliveryNo" id="deliveryNo" /></td> <td width="25%" align="right">Pick up Date:</td> <td width="35%" align="left"><input name="deliveryDate" type="text" id="deliveryDate" /></td> </tr> <tr id="notRcpt" style="display:none"> <td>Other:</td> <td><input name="deliveryNo" type="text" id="deliveryNo" /></td> <td align="right">Pick up Date:</td> <td><input name="otherDeliveryDate" type="text" id="otherDeliveryDate" /></td> </tr> </table> </td> </tr> </table> </form>

    Read the article

< Previous Page | 5 6 7 8 9 10 11 12 13 14 15 16  | Next Page >