Search Results

Search found 694 results on 28 pages for 'validator'.

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

  • CSS3 - Validator - RGBA wrong?

    - by poru
    I'm using the W3C CSS Validator with the Profile CSS3 but the validator says that my CSS rgba()'s are wrong. I looked up the Color Module Level 3, and the syntax is the same as mine. I also tried the Dev-Validator, same result. Example input: div.class { border: 1px solid rgba(0, 0, 0, 0.5); } Am I wrong or why does the validator say that I have that many mistakes with rgba?

    Read the article

  • installing w3c validator on Fedora 11

    - by coure06
    On Fedora 11 i have installed w3c validator using yum install w3c-markup-validator Apache is already installed. Now how can i open validator site locally? i am trying localhost, 127.0.0.1, 127.0.0.2 but validator website is not opening...

    Read the article

  • How to disable JSR-303 Hibernate Validation in Spring3

    - by Pinchy
    After putting hibernate-validator.jar and javax.validation-api.jar in my classpath the org.springframework.dao.DataIntegrityViolationException is replaced by org.hibernate.exception.ConstraintViolationException and this is causing a lot of issues. I have to put this two jars to be able to upgrade Jersey to 2.4, it has dependency on these two jars. Putting these properties into hibernate.properties file doesn't help, hibernate simply ignores them but it loads the properties on start-up loaded properties from resource hibernate.properties: {hibernate.validator.apply_to_ddl=false,hibernate.validator.autoregister_listeners=false etc} javax.persistence.validation.mode=none hibernate.validator.autoregister_listeners=false hibernate.validator.apply_to_ddl=false I am using Spring 3.2.4 with SessionFactory and mapping resources from hbm.xml files with constraints in it, hibernate 3.6.9.final, hibernate-validator 5.0.final, javax.validator-api 1.1.0.Final I just can't figure out how to disable hibernate validation, any help will be much appreciated.

    Read the article

  • How do I write a custom validator for a zend form element with customized error messages?

    - by Mallika Iyer
    I have a question field with a list of allowed characters : A-Z,0-9,colon (:), question mark (?), comma(,), hyphen(-), apostrophe ('). I have the regex which works fine, in the fashion : $question->addValidator('regex', true, array(<regular expresstion>)) The default error message is something like ''' does not match against pattern '' I want to write a custom error message that says ' is not allowed in this field' Is there a simple way to do it using the existing zend components that I'm missing? Is writing a custom validator the only way to achieve what I'm trying to achieve? If yes, how do I write a custom validator (I looked at the documentation and didn't quite understand how I can customize the error messages) If there is any other way, I'd most appreciate that input too. Thanks for taking the time to answer this!

    Read the article

  • configuring local W3C validator on xampp - windows xp sp3

    - by Gabriel
    Hi I have no experience on perl. I am trying to configure the W3C validator on my localhost (win32). I have already followed all the instructions given by W3C @http://validator.w3.org/docs/install_win.html, but I am getting the following error: Can't locate loadable object for module Encode::HanExtra in @INC (@INC contains: C:/xampp/perl/lib C:/xampp/perl/site/lib .) at C:/xampp/validator-0.8.6/httpd/cgi-bin/check line 49 Compilation failed in require at C:/xampp/validator-0.8.6/httpd/cgi-bin/check line 49. BEGIN failed--compilation aborted at C:/xampp/validator-0.8.6/httpd/cgi-bin/check line 49. I'm running perl 5.10.1 on xampp and the following HandExtra Module http://cpansearch.perl.org/src/AUDREYT/Encode-HanExtra-0.23/lib/Encode/HanExtra.pm This is C:/xampp/validator-0.8.6/httpd/cgi-bin/check line 49 : use Encode::HanExtra qw(); # for some chinese character encodings if I document that line using # I get a similar message related to other object: Can't locate loadable object for module Sub::Name in @INC (@INC contains: C:/xampp/perl/lib C:/xampp/perl/site/lib .) at C:/xampp/perl/site/lib/Moose.pm line 12 This is Line 12 at Moose.pm : use Sub::Name 'subname'; I don't know how to proceed. I will appreciate any advise. Thanks

    Read the article

  • Atom feed validator keeps showing Self reference doesn't match document location

    - by Dino
    I am creating an atom feed, but when I validate it I keep getting: Self reference doesn't match document location and the specific line that is causing the error is: <link rel="self" type="application/atom+xml" href="http://www.example.com/test.rss"/> Please can anyone advise what the error is? Ps. I noticed an up arrow just at the end of that line. (presumably something to do with that bbut not sure)

    Read the article

  • Licensing generator/validator program [closed]

    - by AtoMerZ
    I need to write a program that generates/validates license for users of my application. The application has a number of features each of which can be purchased by the user. Also each feature can be enabled in trial mode. Meaning only for a specified duration of time. Before I actually try to write the code myself, I'm wondering if there are any free/commercial programs similar to what I'm looking for.

    Read the article

  • Flex Validator -- Show Red Error Border on DataGrid Cell

    - by gmoniey
    I can successfully add a validator on an item in my datagrid, by passing in the particular element in the dataProvider to the validator, but I can't get the red border to show up around the cell if the validation fails. I have stepped through the validator, and confirmed that it is passing back a failure, but I can't figure out why the red error border doesn't show up. I have a feeling its because I am passing the item in my dataProvider as the validator source, rather than the 'cell' item, but I can't find a way to access the cell. Thanks.

    Read the article

  • password validator using RegExp in Flex

    - by kalyaniRavi
    I have seen several examples in Flex for passowrd validator using RegExp. But every where the validation is happend for single validation. I have a requirement, like password validations like • At least one Upper case letter • At least one numeric character • At least one special character such as @, #, $, etc. • At least one Lower case letter • password lenght minimum 6 digits • password cannot be same as user name Can anyone provide me a code for this..? I have the code only for checking the password is valid or not . check the below code. MXML CODE <mx:FormItem label="Username:" x="83" y="96" width="66"> </mx:FormItem> <mx:FormItem label="Password:" x="88" y="123" width="61"> </mx:FormItem> <mx:Button label="Login" id="btnLogin" tabIndex="2" click="login();" enabled="{formIsValid}" x="327" y="162" width="84"/> <mx:TextInput id="txtPassword" displayAsPassword="true" change="validateForm(event);" x="152" y="121" width="217"/> <mx:TextInput id="txtUserId" change="validateForm(event);" x="152" y="94" width="217"/> AS Code: private function validateForm(event:Event):void { focussedFormControl = event.target as DisplayObject; formIsValid = true; formIsEmpty = (txtUserId.text == "" && txtPassword.text == ""); validate(strVUserId); validate(strVPassword); } private function validate(validator:Validator):Boolean { var validatorSource:DisplayObject = validator.source as DisplayObject; var suppressEvents:Boolean = (validatorSource != focussedFormControl); var event:ValidationResultEvent = validator.validate(null, suppressEvents); var currentControlIsValid:Boolean = (event.type == ValidationResultEvent.VALID); formIsValid = formIsValid && currentControlIsValid; return currentControlIsValid; }

    Read the article

  • which xml validator will work perfectly for multithreading project

    - by Sunil Kumar Sahoo
    Hi All, I have used jdom for xml validation against schema. The main problem there is that it gives an error FWK005 parse may not be called while parsing The main reason was that multiple of threads working for xerces validation at the same time. SO I got the solution that i have to lock that validation. which is not good So I want to know which xml validator works perfectly for multithreading project public static HashMap validate(String xmlString, Validator validator) { HashMap<String, String> map = new HashMap<String, String>(); long t1 = System.currentTimeMillis(); DocumentBuilder builder = null; try { //obtain lock to proceed // lock.lock(); try { builder = DocumentBuilderFactory.newInstance().newDocumentBuilder(); // Source source = new DOMSource(builder.parse(new ByteArrayInputStream(xmlString.getBytes()))); validator.validate(new StreamSource(new StringReader(xmlString))); map.put("ISVALID", "TRUE"); logger.info("We have successfuly validated the schema"); } catch (Exception ioe) { ioe.printStackTrace(); logger.error("NOT2 VALID STRING IS :" + xmlString); map.put("MSG", ioe.getMessage()); // logger.error("IOException while validating the input XML", ioe); } logger.info(map); long t2 = System.currentTimeMillis(); logger.info("XML VALIDATION TOOK:::" + (t2 - t1)); } catch (Exception e) { logger.error(e); } finally { //release lock // lock.unlock(); builder = null; } return map; } Thanks Sunil Kumar Sahoo

    Read the article

  • jQuery validator not working in unit testing

    - by Dbugger
    I have this small HTML file: <html> <head></head> <body> <form id='MyForm'> <input type='text' required /> <input type='submit' /> </form> <script src="/js/jquery-1.9.0.js"></script> <script src="/js/jquery.validate.js"></script> <script> var validator = $("#MyForm").validate(); alert(validator.form()); </script> </body> </html> This alerts me with "false", which is the expected behaviour. The problem comes when I go to unit testing, with js-test-driver: TestCase("MyTests", { setUp: function() { this.myform = "<form id='MyForm'><input type='text' required /><input type='submit' /></form>"; this.validator = $(this.myform).validate(); jstestdriver.console.log("Does the form validate? " + this.validator.form()); }, test_empty: function() { }, }); This code returns me the string Does the form validate? true This is a simplified version of my project of course, but the point is that I dont seem to be able to unit test the validation module im developing, since the jQuery validate plugin doesnt seem to work. What am I missing?

    Read the article

  • Zend_Validate_Abstract custom validator not displaying correct error messages.

    - by Jeremy Dowell
    I have two text fields in a form that I need to make sure neither have empty values nor contain the same string. The custom validator that I wrote extends Zend_Validate_Abstract and works correctly in that it passes back the correct error messages. In this case either: isEmpty or isMatch. However, the documentation says to use addErrorMessages to define the correct error messages to be displayed. in this case, i have attached ->addErrorMessages(array("isEmpty"=>"foo", "isMatch"=>"bar")); to the form field. According to everything I've read, if I return "isEmpty" from isValid(), my error message should read "foo" and if i return "isMatch" then it should read "bar". This is not the case I'm running into though. If I return false from is valid, no matter what i set $this-_error() to be, my error message displays "foo", or whatever I have at index[0] of the error messages array. If I don't define errorMessages, then I just get the error code I passed back for the display and I get the proper one, depending on what I passed back. How do I catch the error code and display the correct error message in my form? The fix I have implemented, until I figure it out properly, is to pass back the full message as the errorcode from the custom validator. This will work in this instance, but the error message is specific to this page and doesn't really allow for re-use of code. Things I have already tried: I have already tried validator chaining so that my custom validator only checks for matches: ->setRequired("true") ->addValidator("NotEmpty") ->addErrorMessage("URL May Not Be Empty") ->addValidator([*customValidator]*) ->addErrorMessage("X and Y urls may not be the same") But again, if either throws an error, the last error message to be set displays, regardless of what the error truly is. I'm not entirely sure where to go from here. Any suggestions?

    Read the article

  • How to create custom asp.net validator that works with UpdatePanel?

    - by Goran
    I think that subject summs it pretty well... I have created my custom validators that work great when I put them on page in design mode. However if I place them in a usercontrol, and then try to add this user control to the parent page via updatepanel, then my custom validators just won't trigger. They simply don't work. Does anyone have any clue on what I have to do here? .net 3.5

    Read the article

  • Adding custom validator without using Zend_Form's addElementPrefixPath

    - by nush
    The problem is that I don't use Zend_Form, so I can't use the built in capabilities. I usually look for three things when setting a validator: - its path (usually in library/path/validators/MyValidator.php) - its class name (tried Validators_MyValidator) and - in application.ini, the autoloaderNamespaces[] = "Validators" I've tried different settings/namings/layouts to no avail. When using a validator in my Zend_Validate_Input, an exception occurs, saying that it couldn't find my plugin/validator, the classes being searched only in Zend/Validate with the Zend_Validate prefix (I didn't try this prefix, though). Wasn't there a setting in app.ini that added a prefix and a path?

    Read the article

  • ASP.NET - Call required field validator before AJAX modalpopup, client side

    - by odinel
    I have an ASP.NET/C# application. The user fills out a form with required fields, then clicks a submit button. An AJAX popup message is then displayed, and if they confirm, their information is posted back to the server. The problem is that the AJAX popup is fired BEFORE the req validator. I need to interrupt this and run the req validator, and then if successful show the popup. I know the req validator is working, because if you cancel the popup message, the req text is shown next to the fields. Textbox and AJAX control code is here: <table> <tr> <td>Name</td> <td> <asp:TextBox ID="txtName" runat="server" CssClass="textBox" AutoPostBack="true"></asp:TextBox> <asp:RequiredFieldValidator ID="reqName" runat="server" Text="*" ControlToValidate="txtName" ValidationGroup="trade" ForeColor="White"></asp:RequiredFieldValidator> </td> </tr> <tr> <td>Address</td> <td> <asp:TextBox ID="txtAdd1" runat="server" CssClass="textBox"></asp:TextBox> <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" Text="*" ControlToValidate="txtAdd1" ValidationGroup="trade" ForeColor="White"></asp:RequiredFieldValidator> </td> </tr> <tr> <td></td> <td> <asp:Button ID="btnSubmitEnquiry" runat="server" CssClass="buttonText" Text="Submit Enquiry" ValidationGroup="trade" /> </td> </tr> </table> <ajax:ModalPopupExtender ID="ModalPopupExtender1" runat="server" okcontrolid="lnkCancel" targetcontrolid="btnSubmitEnquiry" popupcontrolid="pnlConfirm" popupdraghandlecontrolid="PopupHeader" drag="true" ></ajax:ModalPopupExtender> <asp:Button Text="targetbutton" ID="btnConfTgt" runat="server" Style="display: none" /> <asp:Panel ID="pnlConfirm" style="display:none" runat="server"> <div class="PopupContainer"> <div class="PopupBody"> <br /> <div align="center"> <asp:label ID="Label1" runat="server" CssClass="lblConfirmpopup"> Message goes here </asp:label> </div> <br /><br /><br /> <div align="center"> <asp:LinkButton ID="lnkCancel" runat="server" visible="true" Text="Cancel" CommandName="Update" BorderColor="#FFFFFF" BackColor="#000000" BorderWidth="3" BorderStyle="Double" ForeColor="White" Font-Size="13pt" Font-Underline="False"></asp:LinkButton> <asp:LinkButton ID="lnkConfirm" runat="server" visible="true" Text="Submit Enquiry" CommandName="Update" BorderColor="#FFFFFF" BackColor="#000000" BorderWidth="3" BorderStyle="Double" ForeColor="White" Font-Size="13pt" Font-Underline="False" OnClick="btnSubmitEnquiry_Click"></asp:LinkButton> </div> </div> </div> </asp:Panel> I've tried coding the first submit button to call the client-side req validator method, but no joy; it still shows the popup before the req validator. If there's no simple solution, I was thinking of perhaps an 'outside the box' solution, maybe hiding the initial Submit button after the req validation has passed, then showing an additional button with the popup control attached to it. Not sure how I'd be able to achieve this though. Thanks

    Read the article

  • Object validator - is this good design?

    - by neo2862
    I'm working on a project where the API methods I write have to return different "views" of domain objects, like this: namespace View.Product { public class SearchResult : View { public string Name { get; set; } public decimal Price { get; set; } } public class Profile : View { public string Name { get; set; } public decimal Price { get; set; } [UseValidationRuleset("FreeText")] public string Description { get; set; } [SuppressValidation] public string Comment { get; set; } } } These are also the arguments of setter methods in the API which have to be validated before storing them in the DB. I wrote an object validator that lets the user define validation rulesets in an XML file and checks if an object conforms to those rules: [Validatable] public class View { [SuppressValidation] public ValidationError[] ValidationErrors { get { return Validator.Validate(this); } } } public static class Validator { private static Dictionary<string, Ruleset> Rulesets; static Validator() { // read rulesets from xml } public static ValidationError[] Validate(object obj) { // check if obj is decorated with ValidatableAttribute // if not, return an empty array (successful validation) // iterate over the properties of obj // - if the property is decorated with SuppressValidationAttribute, // continue // - if it is decorated with UseValidationRulesetAttribute, // use the ruleset specified to call // Validate(object value, string rulesetName, string FieldName) // - otherwise, get the name of the property using reflection and // use that as the ruleset name } private static List<ValidationError> Validate(object obj, string fieldName, string rulesetName) { // check if the ruleset exists, if not, throw exception // call the ruleset's Validate method and return the results } } public class Ruleset { public Type Type { get; set; } public Rule[] Rules { get; set; } public List<ValidationError> Validate(object property, string propertyName) { // check if property is of type Type // if not, throw exception // iterate over the Rules and call their Validate methods // return a list of their return values } } public abstract class Rule { public Type Type { get; protected set; } public abstract ValidationError Validate(object value, string propertyName); } public class StringRegexRule : Rule { public string Regex { get; set; } public StringRegexRule() { Type = typeof(string); } public override ValidationError Validate(object value, string propertyName) { // see if Regex matches value and return // null or a ValidationError } } Phew... Thanks for reading all of this. I've already implemented it and it works nicely, and I'm planning to extend it to validate the contents of IEnumerable fields and other fields that are Validatable. What I'm particularly concerned about is that if no ruleset is specified, the validator tries to use the name of the property as the ruleset name. (If you don't want that behavior, you can use [SuppressValidation].) This makes the code much less cluttered (no need to use [UseValidationRuleset("something")] on every single property) but it somehow doesn't feel right. I can't decide if it's awful or awesome. What do you think? Any suggestions on the other parts of this design are welcome too. I'm not very experienced and I'm grateful for any help. Also, is "Validatable" a good name? To me, it sounds pretty weird but I'm not a native English speaker.

    Read the article

  • validator="" attribute of <h:inputtext> in jsf causing exception

    - by Amit
    We are trying to migrate from WS5 to WAS7 and the jsf code is causing the following error Original Exception: Error Message: JSPG0227E: Exception caught while translating /jsp/listView/listViewUPD_MAP_UM01.jsp: JSPG0301E: Invalid attribute, validator, for deferred method returning void. Error Code: 500 Target Servlet: /jsp/listView/listViewUPD_MAP_UM01.jsp Error Stack: com.ibm.ws.jsp.translator.JspTranslationException: JSPG0227E: Exception caught while translating /jsp/listView/listViewUPD_MAP_UM01.jsp: JSPG0301E: Invalid attribute, validator, for deferred method returning void. at com.ibm.ws.jsp.translator.visitor.generator.BaseTagGenerator.evaluateAttribute(BaseTagGenerator.java:527)

    Read the article

  • Simple JQuery Validator addMethod not working

    - by tehaaron
    Updated question on the bottom I am trying to validate a super simple form. Eventually the username will be compared to a RegExp statement and the same will go for the password. However right now I am just trying to learn the Validator addMethod format. I currently have this script: JQuery.validator.addMethod( "legalName", function(value, element) { if (element.value == "bob") { return false; } else return true; }, "Use a valid username." ); $(document).ready(function() { $("#form1").validate({ rules: { username: { legalName: true } }, }); }); Which if I am not mistaken should return false and respond with "Use a valid username." if I were to put "bob" into the form. However, it is simply submitting it. I am linking to JQuery BEFORE Validator in the header like instructed. My uber simple form looks like this: <form id="form1" method="post" action=""> <div class="form-row"><span class="label">Username *</span><input type="text" name="username" /></div> <div class="form-row"><input class="submit" type="submit" value="Submit"></div> </form> Finally how would I go about restructing the addMethod function to return true if and false at the else stage while keeping the message alert for a false return? (ignore this last part if you don't understand what I was trying to say :) ) Thanks in advance. Thank to everyone who pointed out my JQuery - jQuery typo. New Ideally, I am trying to turn this into a simple login form (username/password). It is for demonstration only so it wont have a database attached or anything, just some simple js validations. I am looking to make the username validate for <48 characters, only english letters and numbers, no special characters. I thought a whitelist would be easiest so I had something like this: ^[a-zA-Z0-9]*${1,48} but I am not sure if that is proper JS RegExp (it varies from Ruby RegExp if I am not mistaken?...Usually I use rubular.com). Password will be similar but require some upper/lowercase and numbers. I believe I need to make another $.validator.addMethod for legalPassword that will look very similar.

    Read the article

  • Localized Date Validator

    - by Blithe
    Is there a way to use user's culture to localize the Range Validator for date? I am looking for a good way to validate date and avoiding to provide a fix format (e.g.: do a dd/mm/yyyy using Regular Expression Validator)

    Read the article

  • Using the jQuery Validator

    - by ScG
    I am using $.validator.addMethod How can I print the validation message in a control. I have a div id="err" where I want to print the message Here is what my method looks like $.validator.addMethod('something', function(value, element) { return false; }, 'I want to display this message in a Div with ID=error')

    Read the article

  • jQuery Validator - Dynamic Text

    - by James
    Adding a validator to my form: jQuery.validator.addMethod('whatever', function(val, el) { // whatever goes here }, 'A maximum of ' + $('#my_id_here').val() + ' categories can be selected.'); This doesn't fly. I always get undefined. Is this a good, simple way to do this? Thanks

    Read the article

  • JQuery URL Validator

    - by Vincent
    All, I am trying to use JQuery's URL Validator plugin. http://docs.jquery.com/Plugins/Validation/Methods/url I have a text box that has a URL. I want to write a function which takes the textbox value, uses the jquery's validator plugin to validate urls and returns true or false. Something like Ex: function validateURL(textval) { // var valid = get jquery's validate plugin return value if(valid) { return true; } return false; } I wanted this to be a reusable function.. Thanks

    Read the article

  • Validating DataAnnotations with Validator class

    - by Pablote
    I'm trying to validate a class decorated with dataannotation with the Validator class. It works fine when the attributes are applied to the same class. But when I try to use a metadata class it doesn't work. Is there anything I should do with the Validator so it uses the metadata class? Here's some code.. this works: public class Persona { [Required(AllowEmptyStrings = false, ErrorMessage = "El nombre es obligatorio")] public string Nombre { get; set; } [Range(0, int.MaxValue, ErrorMessage="La edad no puede ser negativa")] public int Edad { get; set; } } this doesnt work: [MetadataType(typeof(Persona_Validation))] public class Persona { public string Nombre { get; set; } public int Edad { get; set; } } public class Persona_Validation { [Required(AllowEmptyStrings = false, ErrorMessage = "El nombre es obligatorio")] public string Nombre { get; set; } [Range(0, int.MaxValue, ErrorMessage = "La edad no puede ser negativa")] public int Edad { get; set; } } this is how I validate the instances: ValidationContext context = new ValidationContext(p, null, null); List<ValidationResult> results = new List<ValidationResult>(); bool valid = Validator.TryValidateObject(p, context, results, true); thanks.

    Read the article

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