Search Results

Search found 5309 results on 213 pages for 'w3c validation'.

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

  • Multiple schema validation in Java

    - by user279554
    Hi, I am trying to do multiple schema validation in Java. I don't understand where I am doing wrong. Any help will be appreciated. abc.xsd <?xml version="1.0" encoding="UTF-8"?> <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xn="project-xml-r4j_another.xsd"> <xsd:import namespace="project-xml-r4j_another.xsd"/> <xsd:element name="abc" type="abc"> </xsd:element> <xsd:complexType name="abc"> <xsd:sequence> <xsd:element name="test" type="test" minOccurs="0" maxOccurs="1"> </xsd:element> <!--<xsd:element name="proj" type="xn:proj"/>--> </xsd:sequence> <xsd:attribute name="id" type="xsd:ID" use="required"/> </xsd:complexType> <xsd:complexType name="test"> <xsd:attribute name="id" type="xsd:ID" use="required"></xsd:attribute> <xsd:attribute name="value" use="required"> <xsd:simpleType> <xsd:restriction base="xsd:string"> <xsd:maxLength value="100" /> </xsd:restriction> </xsd:simpleType> </xsd:attribute> </xsd:complexType> </xsd:schema> project-xml-r4j_another.xsd <?xml version="1.0" encoding="UTF-8"?> <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" targetNamespace="project-xml-r4j_another.xsd" xmlns="project-xml-r4j_another.xsd" elementFormDefault="qualified" attributeFormDefault="unqualified"> <xsd:element name="proj" type="proj"> <xsd:annotation> <xsd:documentation> The project is the root tag of a project-xml. </xsd:documentation> </xsd:annotation> </xsd:element> <xsd:complexType name="proj"> <xsd:attribute name="id" type="xsd:ID" use="required"/> </xsd:complexType> </xsd:schema> Test case package test; import java.io.File; import java.io.IOException; import javax.xml.XMLConstants; import javax.xml.transform.Source; import javax.xml.transform.stream.StreamSource; import javax.xml.validation.Schema; import javax.xml.validation.SchemaFactory; import javax.xml.validation.Validator; import org.apache.log4j.Logger; import org.junit.Test; import org.xml.sax.SAXException; import org.xml.sax.SAXParseException; import org.xml.sax.helpers.DefaultHandler; import com.ericsson.ccrtool.core.project.projectxml.InvalidProjectXmlException; public class TestSchema { private static final Logger logger = Logger.getLogger(TestSchema.class); static final String W3C_XML_SCHEMA = XMLConstants.W3C_XML_SCHEMA_NS_URI; @Test public void test() { System.out.println("TestSchema.test()"); try { SchemaFactory schemaFactory = SchemaFactory.newInstance(W3C_XML_SCHEMA); // create a grammar object. Source [] source = { new StreamSource(new File("C:\\jaydeep\\Ericsson\\R5B\\abc.xsd")), new StreamSource(new File("C:\\jaydeep\\Ericsson\\R5B\\project-xml-r4j.xsd"))}; Schema schemaGrammar = schemaFactory.newSchema(source); Validator schemaValidator = schemaGrammar.newValidator(); schemaValidator.setErrorHandler(new MessageHandler()); // validate xml instance against the grammar. schemaValidator.validate(new StreamSource("C:\\jaydeep\\Ericsson\\R5B\\project_tmmk17cells_xnaveen_project-xml.xml")); } catch (SAXException e) { throw new InvalidProjectXmlException("Project-xml validation failed, Exception: " + e.getMessage(), e); } catch (IOException e) { throw new InvalidProjectXmlException("Project-xml validation failed, Exception: " + e.getMessage(), e); } } class MessageHandler extends DefaultHandler { private String errMessage = ""; @Override public void warning(SAXParseException e) { logger.info("Warning Line " + e.getLineNumber() + ": " + e.getMessage()); } @Override public void error(SAXParseException e) { errMessage = new String("Error Line " + e.getLineNumber() + ": " + e.getMessage()); logger.info(errMessage); throw new InvalidProjectXmlException("Project-xml validation failed, Exception: " + errMessage); } @Override public void fatalError(SAXParseException e) { errMessage = new String("Error Line " + e.getLineNumber() + ": " + e.getMessage()); logger.info(errMessage); throw new InvalidProjectXmlException("Project-xml validation failed, Exception: " + errMessage); } } } Thanks, Jaydeep

    Read the article

  • wcf generated classes and validation application block attributes

    - by Shaboboo
    Hi, I'm new to the validation application block and trying to use it with wcf... I have a wcf service that has data objects with validation rules defined with attributes, using the validation application block . On my client side (WPF), I have a service reference. When I update the service reference the generated classes do not have the validation rules attributes in them. How can I get the rules from the service? Am I missing some step, or is it not possible?

    Read the article

  • Jquery Validation Watermark

    - by Sandeep
    I am using jQuery validation plugin and Watermark plugin. The problem I am facing is when i applied a watermark to any input field for which validation is also applied then validations are failing For Example: <input type=text name=myinput class="required"> and I applied a watermark for this field in document ready function: $("#myinput ").Watermark("myinput "); This is the sample case where validation is failing as value=myinput is set for input field which is watermarked.

    Read the article

  • Codeigniter validation help

    - by Drew McGhie
    I'm writing a system where users can generate/run queries on demand based on the values of 4 dropdown lists. The lists are dynamically generated based on a number of factors, but at this point, I'm having problems validating the input using codeigniter's built in validation classes. I think I have things out of order, and I've tried looking at the codeigniter site, but I think I'm tripping myself up. in my view(/dashboard/dashboard_index.php), I have the following code block: <?=form_open('dashboard/dashboard_add');?> <select ... name='selMetric'> <select ... name='selPeriod'> <select ... name='selSpan'> <select ... name='selTactic'> <input type="submit" name="submit_new_query" value="Add New Graph" class="minbutton" ></input> <?=form_close();?> Then in my controller, I have the following 2 methods: function index() { $this->load->helper(array('form', 'url')); $this->load->library('validation'); //population of $data $this->load->tile('dashboard/dashboard_index', $data); } function dashboard_add() { $rules['selMetric'] = "callback_sel_check"; $rules['selPeriod'] = "callback_sel_check"; $rules['selSpan'] = "callback_sel_check"; $rules['selTactic'] = "callback_sel_check"; $this->validation->set_rules($rules); $fields['selMetric'] = "Metric"; $fields['selPeriod'] = "Time Period"; $fields['selSpan'] = "Time Span"; $fields['selTactic'] = "Tactic"; $this->validation->set_fields($fields); if ($this->validation->run() == false) { $this->index(); } else { //do stuff with validation information } } Here's my issue. I can get the stuff to validate correctly, but for the number of errors I have, I get Unable to access an error message corresponding to your field name. as the error message for everything. I think my issue that I have the $rules and $fields stuff in the wrong place, but I've tried a few permutations and I just keep getting it wrong. I was hoping I could get some advice on the correct place to put things.

    Read the article

  • JQuery username validation - Ajax call

    - by Denise
    Hi, I am currently using JQuery's validation plugin for basic form validation such as required fields. I want to add functionality so that when the user types in the username field, an ajax call is triggered to check whether the username is already taken. My requirements are: Preferably integrate with JQuery Validation plugin, rather than writing a custom function I want the lookup to occur on the nkeyup event I want the lookup to be triggered approx 0.5 seconds after the keyup event has occurred. Thanks!

    Read the article

  • PHP Form Validation

    - by JM4
    This question will undoubtedly be difficult to answer and ask in a way that makes sense but I'll try my best: I have a form which uses PHP to display certain sections of the form such as: <?php if ($_SESSION['EnrType'] == "Individual") { display only form information for individual enrollment } ?> and <?php if ($_SESSION['Num_Enrs'] > 6) { display only form information for 7 total members enrollment } ?> In each form piece, unique information is collected about each enrollee but the basic criteria for each enrollee is the same, i.e. All enrollee's must use have a value in the FirstName field. Each field is named according to the enrollee number, i.e. Num1FirstName; Num2FirstName. I have a PHP validation script which is absolutely fantastic and am not looking to change it but the issue I am running into is duplication of the script in order to validate ALL fields in one swoop. On submission, all POSTED items are run through my validation script and based on the rules set return an error if they do not equal true. Sample code: if (isset($_POST['submit'])) { // import the validation library require("validation.php"); $rules = array(); // stores the validation rules //All Enrollee Rules $rules[] = "required,Num1FirstName,Num2FirstName,The First Name field is required."; The script above does the following, $rules[] ="REQUIREMENT,fieldname,error message" where requirement gives criteria (in this case, simply that a value is passed), fieldname is the name of the field being validated, and error message returns the error used. My Goal is to use the same formula above and have $rules[] run through ALL firstnames and return the error posted ONLY if they exist (i.e. dont check for member #7's first name if it doesnt exist on the screen). If I simply put a comma between the 'fieldnames' this only checks for the first, then second, and so on so this wont work. Any ideas?

    Read the article

  • jQuery Validation 1.10 and MVC server-side errors

    - by sam360
    This feature used to work just fine on my website. If I added a custom error to ModelState, the input on the page would be marked as "input-validation-error" and the Html.ValidationMessage() would take care of rendering a span with the error message inside it. Due to incompatibility reasons we had to upgrade our jQuery Validation to 1.10: Now when I add a custom error to ModelState, I can debug and see that the HTML elements being rendered correctly, but as soon as the page load is completed, jQuery Validation removes the error message and set the "class" attribute of the input to "valid"! Has any one else come across this issue? UPDATE Testing further shows that the error message is shown on the screen until the field gains focus. As soon as the field gains focus jQuery Validation removes the customer server-side error message and marks the field as good.

    Read the article

  • Validation library PHP / Javascript

    - by pistacchio
    Hi, could someone recommend a PHP form validation library (that works independently outside of any php framework) that apart from doing all sort of basic validation (is empty, vs regex, is email, is alphanumeric and so on) can produce javascript code (ideally to work with jquery) to validate the very same form with the very same rules client-side and hence define validation rules in a single place and have a form validated both server and client side? Thanks.

    Read the article

  • Set Validation Tooltip in CodeBehind instead of XAML

    - by KrisTrip
    I would like to know how to translate the following code to codebehind instead of XAML: <Style.Triggers> <Trigger Property="Validation.HasError" Value="true"> <Setter Property="ToolTip" Value="{Binding RelativeSource={RelativeSource Self}, Path=(Validation.Errors)[0].ErrorContent}"/> </Trigger> </Style.Triggers> The part I can't figure out is the Path portion. I have the following but it doesn't work: new Trigger { Property = Validation.HasErrorProperty, Value = true, Setters = { new Setter { Property = Control.ToolTipProperty, // This part doesn't seem to work Value = new Binding("(Validation.Errors)[0].ErrorContent"){RelativeSource = RelativeSource.Self} } } } Help?

    Read the article

  • ASP.NET MVC validation in weakly typed views

    - by Eedoh
    Hello. I have a problem validating data on view that is not strongly typed. I'm updating data from 3 different models on that view, and I have validation methods that work on them, but I don't know how to display the validation message. Where should I put validation messages (on strongly typed views I put them in ModelState, I presume that does not make sense in this case), and how should I display them (I doubt that I will be able to use "validationmessagefor", maybe "validationmessage" somehow)?

    Read the article

  • Livevalidation clientside validation - can you control the position of the validation messages?

    - by JK
    I'm using LiveValidaion for my clientside validation http://livevalidation.com/ and DataAnnotations for my validation rules. This all works fine except that the clientside error messages are only ever displayed to the right of the element being validated. Is it possible to move this validation message below the element being validated? Or even better, group all messages in a div at the top/bottom of the page? I dont see anything in their docs or examples

    Read the article

  • asp net mvc client validation with partial views and AJAX

    - by griZZZly8
    Hello, I'm using client validation function of the MVC 2.0 framework (with Html.ValidationMessageFor() and Html.EnableClientValidation()) Everything is nice, when I use the validation in a simple form. But when I get this form via jQuery AJAX $.get('PathToMyForm', function(htmlResult) { $('selector').html(htmlResult); }); client validation doesn't works.

    Read the article

  • Enterprise Library Validation Block - Should validation be placed on class or interface?

    - by Robert MacLean
    I am not sure where the best place to put validation (using the Enterprise Library Validation Block) is? Should it be on the class or on the interface? Things that may effect it Validation rules would not be changed in classes which inherit from the interface. Validation rules would not be changed in classes which inherit from the class. Inheritance will occur from the class in most cases - I suspect some fringe cases to inherit from the interface (but I would try and avoid it). The interface main use is for DI which will be done with the Unity block.

    Read the article

  • Doing a lot of input validation in VB.NET

    - by Andy
    I have a form set up where users can enter their booking for a room at my college. I want to validate the user input to avoid SQL injection (my program uses a MS Access database) and also stop numbers and synbols in their name, etc. I can do the validation fine, but there is to be a lot of validation and then methods executed only if all validation tests come back as true. I did have something like this: If txtName.Text = "" Then frmBookErr.SetError(txtName, "Name field cannot be left blank.") fail = 1 Else frmBookErr.SetError(txtName, "") fail = 0 End If And then check the fail variable, but it obviously gets overridden later in the form if one of the validation tests come back as true. Can anyone provide some input into this? Thanks.

    Read the article

  • DataAnnotations jQuery validation in asp.net mvc 2

    - by Anonimous
    Hi, I trying to use jQuery validation plugin with DataAnnotations in asp.net mvc 2 final. Now I'm using MicrosoftMvcValidation.js and it works. But I can't find way to work with jQuery validation. I read about MicrosoftMvcJQueryValidation.js. But I think that it is obsolete. How can I use DataAnnotations with jQuery validation plugin?

    Read the article

  • ASP.NET MVC 2 Client Side Validation doesn't work as advertised in VS2010

    - by Daniel Crenna
    In VS2010 and ASP.NET MVC 2, it seems that client-side validation (JQuery Futures or the stock option) doesn't quite work as advertised. I'm noticing that "tabbing off" a validated element will not invoke the client-side validation as promised. For a required field, you have to tab into the element, enter something, then remove it completely, in order to trigger the required validation. That's not really what I'm after here, and I'm hoping it's just a configuration issue on my side. How do I get the validation effects from previous versions so that a previous value isn't necessary (without having to modify the client-side scripts if possible)?

    Read the article

  • CEN/CENELEC Lacks Perspective

    - by trond-arne.undheim
    Over the last few months, two of the European Standardization Organizations (ESOs), CEN and CENELEC have circulated an unfortunate position statement distorting the facts around fora and consortia. For the benefit of outsiders to this debate, let's just say that this debate regards whether and how the EU should recognize standards and specifications from certain fora and consortia based on a process evaluating the openness and transparency of such deliverables. The topic is complex, and somewhat confusing even to insiders, but nevertheless crucial to the European economy. As far as I can judge, their positions are not based on facts. This is unfortunate. For the benefit of clarity, here are some of the observations they make: a)"Most consortia are in essence driven by technology companies making hardware and software solutions, by definition very few of the largest ones are European-based". b) "Most consortia lack a European presence, relevant Committees, even those that are often cited as having stronger links with Europe, seem to lack an overall, inclusive set of participants". c) "Recognising specific consortia specifications will not resolve any concrete problems of interoperability for public authorities; interoperability depends on stringing together a range of specifications (from formal global bodies or consortia alike)". d) "Consortia already have the option to have their specifications adopted by the international formal standards bodies and many more exercise this than the two that seem to be campaigning for European recognition. Such specifications can then also be adopted as European standards." e) "Consortium specifications completely lack any process to take due and balanced account of requirements at national level - this is not important for technologies but can be a critical issue when discussing cross-border issues within the EU such as eGovernment, eHealth and so on". f) "The proposed recognition will not lead to standstill on national or European activities, nor to the adoption of the specifications as national standards in the CEN and CENELEC members (usually in their official national languages), nor to withdrawal of conflicting national standards. A big asset of the European standardization system is its coherence and lack of fragmentation." g) "We always miss concrete and specific examples of where consortia referencing are supposed to be helpful." First of all, note that ETSI, the third ESO, did not join the position. The reason is, of course, that ETSI beyond being an ESO, also has a global perspective and, moreover, does consider reality. Secondly, having produced arguments a) to g), CEN/CENELEC has the audacity to call a meeting on Friday 25 February entitled "ICT standardization - improving collaboration in Europe". This sounds very nice, but they have not set the stage for constructive debate. Rather, they demonstrate a striking lack of vision and lack of perspective. I will back this up by three facts, and leave it there. 1. Since the 1980s, global industry fora and consortia, such as IETF, W3C and OASIS have emerged as world-leading ICT standards development organizations with excellent procedures for openness and transparency in all phases of standards development, ex post and ex ante. - Practically no ICT system can be built without using fora and consortia standards (FCS). - Without using FCS, neither the Internet, upon which the EU economy depends, nor EU institutions would operate. - FCS are of high relevance for achieving and promoting interoperability and driving innovation. 2. FCS are complementary to the formally recognized standards organizations including the ESOs. - No work will be taken away from the ESOs should the EU recognize certain FCS. - Each FCS would be evaluated on its merit and on the openness of the process that produced it. ESOs would, with other stakeholders, have a say. - ESOs could potentially educate and assist European stakeholders to engage more actively and constructively with FCS. - ETSI, also an ESO, seems to clearly recognize these facts. 3. Europe and its Member States have a strong voice in several of the most relevant global industry fora and consortia. - W3C: W3C was founded in 1994 by an Englishman, Sir Tim Berners-Lee, in collaboration with CERN, the European research lab. In April 1995, INRIA (Institut National de Recherche en Informatique et Automatique) in France became the first European W3C host and in 2003, ERCIM (European Research Consortium in Informatics and Mathematics), also based in France, took over the role of European W3C host from INRIA. Today, W3C has 326 Members, 40% of which are European. Government participation is also strong, and it could be increased - a development that is very much desired by W3C. Current members of the W3C Advisory Board includes Ora Lassila (Nokia) and Charles McCathie Nevile (Opera). Nokia is Finnish company, Opera is a Norwegian company. SAP's Claus von Riegen is an alumni of the same Advisory Board. - OASIS: its membership - 30% of which is European - represents the marketplace, reflecting a balance of providers, user companies, government agencies, and non-profit organizations. In particular, about 15% of OASIS members are governments or universities. Frederick Hirsch from Nokia, Claus von Riegen from SAP AG and Charles-H. Schulz from Ars Aperta are on the Board of Directors. Nokia is a Finnish company, SAP is a German company and Ars Aperta is a French company. The Chairman of the Board is Peter Brown, who is an Independent Consultant, an Austrian citizen AND an official of the European Parliament currently on long-term leave. - IETF: The oversight of its activities is by the Internet Architecture Board (IAB), since 2007 chaired by Olaf Kolkman, a Dutch national who lives in Uithoorn, NL. Kolkman is director of NLnet Labs, a foundation chartered to develop open source software and open source standards for the Internet. Other IAB members include Marcelo Bagnulo whose affiliation is the University Carlos III of Madrid, Spain as well as Hannes Tschofenig from Nokia Siemens Networks. Nokia is a Finnish company. Siemens is a German company. Nokia Siemens is a European joint venture. - Member States: At least 17 European Member States have developed Interoperability Frameworks that include FCS, according to the EU-funded National Interoperability Framework Observatory (see list and NIFO web site on IDABC). This also means they actively procure solutions using FCS, reference FCS in their policies and even in laws. Member State reps are free to engage in FCS, and many do. It would be nice if the EU adjusted to this reality. - A huge number of European nationals work in the global IT industry, on European soil or elsewhere, whether in EU registered companies or not. CEN/CENELEC lacks perspective and has engaged in an effort to twist facts that is quite striking from a publicly funded organization. I wish them all possible success with Friday's meeting but I fear all of the most important stakeholders will not be at the table. Not because they do not wish to collaborate, but because they just have been insulted. If they do show up, it would be a gracious move, almost beyond comprehension. While I do not expect CEN/CENELEC to line up perfectly in favor of fora and consortia, I think it would be to their benefit to stick to more palatable observations. Actually, I would suggest an apology, straightening out the facts. This works among friends and it works in an organizational context. Then, we can all move on. Standardization is important. Too important to ignore. Too important to distort. The European economy depends on it. We need CEN/CENELEC. It is an important organization. But CEN/CENELEC needs fora and consortia, too.

    Read the article

  • Le W3C lance WebPlatform.org, une initiative collective pour un Web meilleur

    WebPlatform.org la communauté de développeurs pour un Web meilleur. [IMG]http://www1.webplatform.org/assets/logo-with-text.png[/IMG] Des grands noms comme Google, Facebook, HP, Microsoft, le W3C, Nokia et d'autres ont lancé le site WebPlatform.org. Il a pour vocation de rassembler autour de la table les contributeurs, les différents navigateurs et différentes plateformes afin de construire des ressources compatibles et de maintenir une évolution saine du Web. Il comprend une documentation combinée provenant des sites de tous les fournisseurs principaux de navigateur comme par exemple un wiki modifiable, un foru...

    Read the article

  • Data Validation of a Comma Delimited List

    - by Brad
    I need a simple way of taking a comma seperated list in a cell, and providing a drop down box to select one of them. For Example, the cell could contain: 24, 32, 40, 48, 56, 64 And in a further cell, using Data Validation, I want to provide a drop-down list to select ONE of those values I need to do this without VBA or Macros please. Apolgies, I want this to work with Excel 2010 and later. I have been playing around with counting the number of commas in the list and then trying to split this into a number of rows of single numbers etc with no joy yet.

    Read the article

  • jQuery Validate - require at least one field in a group to be filled

    - by Nathan Long
    I'm using the excellent jQuery Validate Plugin to validate some forms. On one form, I need to ensure that the user fills in at least one of a group of fields. I think I've got a pretty good solution, and wanted to share it. Please suggest any improvements you can think of. Finding no built-in way to do this, I searched and found Rebecca Murphey's custom validation method, which was very helpful. I improved this in three ways: To let you pass in a selector for the group of fields To let you specify how many of that group must be filled for validation to pass To show all inputs in the group as passing validation as soon as one of them passes validation. So you can say "at least X inputs that match selector Y must be filled." The end result is a rule like this: partnumber: { require_from_group: [2,".productinfo"] } //The partnumber input will validate if //at least 2 `.productinfo` inputs are filled For best results, put this rule AFTER any formatting rules for that field (like "must contain only numbers", etc). This way, if the user gets an error from this rule and starts filling out one of the fields, they will get immediate feedback about the formatting required without having to fill another field first. Item #3 assumes that you're adding a class of .checked to your error messages upon successful validation. You can do this as follows, as demonstrated here. success: function(label) { label.html(" ").addClass("checked"); } As in the demo linked above, I use CSS to give each span.error an X image as its background, unless it has the class .checked, in which case it gets a check mark image. Here's my code so far: jQuery.validator.addMethod("require_from_group", function(value, element, options) { // From the options array, find out what selector matches // our group of inputs and how many of them should be filled. numberRequired = options[0]; selector = options[1]; var commonParent = $(element).parents('form'); var numberFilled = 0; commonParent.find(selector).each(function(){ // Look through fields matching our selector and total up // how many of them have been filled if ($(this).val()) { numberFilled++; } }); if (numberFilled >= numberRequired) { // This part is a bit of a hack - we make these // fields look like they've passed validation by // hiding their error messages, etc. Strictly speaking, // they haven't been re-validated, though, so it's possible // that we're hiding another validation problem. But there's // no way (that I know of) to trigger actual re-validation, // and in any case, any other errors will pop back up when // the user tries to submit the form. // If anyone knows a way to re-validate, please comment. // // For imputs matching our selector, remove error class // from their text. commonParent.find(selector).removeClass('error'); // Also look for inserted error messages and mark them // with class 'checked' var remainingErrors = commonParent.find(selector) .next('label.error').not('.checked'); remainingErrors.text("").addClass('checked'); // Tell the Validate plugin that this test passed return true; } // The {0} in the next line is the 0th item in the options array }, jQuery.format("Please fill out at least {0} of these fields.")); Questions? Comments?

    Read the article

  • Entlib validation to syntax to accept only numeric month numbers?

    - by ElHaix
    I've got an enum defined as such: Private Enum AllowedMonthNumbers _1 _2 _3 _4 _5 _6 _7 _8 _9 _10 _11 _12 End Enum Then a property validator defined as: <TypeConversionValidator(GetType(Int32), MessageTemplate:="Card expiry month must be numeric.", Ruleset:="CreditCard")> _ <EnumConversionValidator(GetType(AllowedMonthNumbers), MessageTemplate:="Card expiry month must be between 1 and 12.", Ruleset:="CreditCard")> _ The validation expects "_#", as when I remove the TypeConversionValidator, it passes with setting the value to "_3" or any other number in the enum. What I need is for this to only accept b/t 1-12, and simply having numeric values in the enum won't work. Any tips? Thanks. UPDATE I replaced the EnumConversionValidator with a RangeValidator, and attempting to set the parameter to "1", but received the following error: <RangeValidator(1, RangeBoundaryType.Inclusive, 12, RangeBoundaryType.Inclusive, MessageTemplate:="..."> However that's now giving me the following error: System.Web.Services.Protocols.SoapException : System.Web.Services.Protocols.SoapException: Server was unable to process request. ---> System.ArgumentException: Object must be of type Int32. at System.Int32.CompareTo(Object value) at Microsoft.Practices.EnterpriseLibrary.Validation.Validators.RangeChecker`1.IsInRange(T target) at Microsoft.Practices.EnterpriseLibrary.Validation.Validators.RangeValidator`1.DoValidate(T objectToValidate, Object currentTarget, String key, ValidationResults validationResults) at Microsoft.Practices.EnterpriseLibrary.Validation.Validator`1.DoValidate(Object objectToValidate, Object currentTarget, String key, ValidationResults validationResults) at Microsoft.Practices.EnterpriseLibrary.Validation.Validators.AndCompositeValidator.DoValidate(Object objectToValidate, Object currentTarget, String key, ValidationResults validationResults) at Microsoft.Practices.EnterpriseLibrary.Validation.Validators.ValueAccessValidator.DoValidate(Object objectToValidate, Object currentTarget, String key, ValidationResults validationResults) at Microsoft.Practices.EnterpriseLibrary.Validation.Validators.AndCompositeValidator.DoValidate(Object objectToValidate, Object currentTarget, String key, ValidationResults validationResults) at Microsoft.Practices.EnterpriseLibrary.Validation.Validators.GenericValidatorWrapper`1.DoValidate(T objectToValidate, Object currentTarget, String key, ValidationResults validationResults) at Microsoft.Practices.EnterpriseLibrary.Validation.Validator`1.Validate(T target, ValidationResults validationResults) at Microsoft.Practices.EnterpriseLibrary.Validation.Validation.Validate[T](T target, String[] rulesets) at ....

    Read the article

  • Globalizing ASP.NET MVC Client Validation

    One of my favorite features of ASP.NET MVC 2 is the support for client validation. Ive covered a bit about validation in the following two posts: ASP.NET MVC 2 Custom Validation covers writing a custom client validator. Localizing ASP.NET MVC Validation covers localizing error messages. However, one topic I havent covered is how validation works with globalization. A common example of this is when validating a number, the client validation should understand that users in the US enter periods...Did you know that DotNetSlackers also publishes .net articles written by top known .net Authors? We already have over 80 articles in several categories including Silverlight. Take a look: here.

    Read the article

  • jQuery AJAX Validation Using The Validity Plugin

    - by schnieds
    Input validation is one of those areas that most developers view as a necessary evil. We know that it is necessary and we really do want to ensure that we get good input from our users. But most of us are lazy (me included) and input validation is one of those things that gets done but usually is a quick and dirty implementation. This is partly due to laziness and partly do to input validation being painful. Thanks to the amazing jQuery Validity plug in, input validation can be really slick, easy and robust enough to work any any scenario. I specifically like the Validity plugin because it supports jQuery AJAX input validation. Other input validation implementations that I have worked with require a form post to take place. However, if you are using jQuery.ajax methods then there isn’t a form and you need to validate the formless input. [Read More] Aaron Schniederhttp://www.churchofficeonline.com

    Read the article

  • Using Validation Groups Inside ASP.NET User Controls

    - by bipinjoshi
    Validation groups allow you to validate data entry controls in groups. Server controls such as validation controls, Button and TextBox have ValidationGroup property that takes a string value. All the server controls having the same ValidationGroup value act as one validation group. Validation groups come handy in situations where you wish to validate only a small set of controls from many controls housed on a Web Form. Using validation groups is quite easy and straightforward. However, if you have a validation group inside a user control and there are more than one user control instances on a Web Form you face some problem.http://www.binaryintellect.net/articles/13427d3d-1f98-4dc0-849b-72e95b8b66a2.aspx 

    Read the article

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