validation

Are selectOne and selectMany choices bounded by SelectItems?

Do the JSF selectOne and selectMany controls only allow submission of values defined in the given selectItems? I'm concerned about parameter spoofing, and if this was built-in, I wouldn't require a validator to ensure the selected value was one of the valid choices. ...

Custom tld function validation in eclipse

Hi, I am working in eclipse (Ganymede 3.4.1) and have created a ctl TLD : <?xml version="1.0" encoding="UTF-8"?> <taglib version="2.0" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-jsptaglibrary_2_0.x...

Validating one or the other

I've created a javascript function that allows me to validate if one field or the other is filled (called, shockingly enough, oneortheother). Essentially, it checks if neither is filled, or both, and throws an error. One of the fields being validated is a input type="file" field. I'm displaying below the field the existing file, so tha...

validating HTML

Hello, I am beginner in HTML and CSS. I just designed web site and tried to validate but my HTML end up having some "geovisit();" and it wont validate. I do not know how to get rid of it. Help me? Thank you Guest ...

Exist a generic library of validators for obj-c?

I wonder if already exist a generic library of validator suitable for a iPhone project (or better, bussines objects) for obj-c. Things like: Validator.IsNotEmpty.. Validator.IsValidEmail.. Validator.IsValidZipCode.. Validator.IsValidRegex.. Validator.IsInRange.. ...

Regex for url validation with parts capturing

Can a single regex be used to valdate urls and match all the parts, I have been working on one and what I have come up with so far is: (?:(?P<scheme>[a-z]*?)://)?(?:(?P<username>.*?):?(?P<password>.*?)?@)?(?P<hostname>.*?)/(?:(?:(?P<path>.*?)\?)?(?P<file>.*?\.[a-z]{1,6})?(?:(?:(?P<query>.*?)#?)?(?P<fragment>.*?)?)?)? however this does...

Are nested HTML comments possible?

Hello, as per the title; is it possible to have nested comments in valid HTML? see the example below... <p>some text</p> <!-- comment 1 <p>commented out html</p> <!-- comment 2 // are nested html comment allowed? end of comment 2 --> <p>more commented out html</p> end of comment 1 --> <p>some more text<...

Using the AutoComplete feature of ComboBox, while limiting values to those in the list?

In WinForms 2.0, a ComboBox has an Auto-Complete feature, that displays a custom Drop-Down list with only the values that start with the entered text. However, if I want to limit valid values to only those that appear in the ComboBox's list of items, I can do that by setting the DropDownStyle to DropDownList, which stops the user from e...

[SSRS] Parameter Validation on Reports

I'm new to SSRS, so I apologize if this question is too simple: I have a report which accepts a parameter called "Amount". I want to constrain valid inputs to currency values >= 0, and pop open an error message if the user enters improper values. I don't want to validate inputs in my stored procedure and throw exceptions, because SSRS ...

Microsoft Enterprise Library 3.1 - Validation - Message From resx

Hi, I am trying to use the Enterprise Library 3.1 Validation Block for validating my objects in a new project. This application is to be multi-lingual and as such need to be able to put my error messages into resx files. How would you go about doing this? Would you use the config section or Attributes on the objects themselves and how d...

Can I copy/clone a function in JavaScript?

I'm using jQuery with the validators plugin. I would like to replace the "required" validator with one of my own. This is easy: jQuery.validator.addMethod("required", function(value, element, param) { return myRequired(value, element, param); }, jQuery.validator.messages.required); So far, so good. This works just fine. But what I...

Validators: Do they Stay disabled on postback when disabled ClientSide?

Hello! I have been learning alot about the standard asp.net Validators, and my latest discovery was about how to disable a validator client side, which was pretty cool. now, if my initial post has the validator enabled, but client side, i disable it, does the server side recognize the client side change, and keep it, or does it get re-...

What alternatives are there for PHPLint that run under Windows?

I just finished a little 5000-line PHP application and are now going into testing and debugging. A short while before the end I stumbled upon PHPLint. I really liked the idea - with some special comments I can specify variable types and the tool then checks my code for all kinds of mistakes. Neat. I thought that at the end of the develop...

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

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 cl...

Verify a date in JavaScript

I need to do user validation of a date field, it should be in the format yyyyMMdd and should not be more than one year in the future. How would I go about doing this? Currently I only have a crude regexp which is insufficient. function VerifyDate(source, args) { var regexp = /^([1-2]{1}[0-9]{1})\d{2}([0][1-9]|[1][0-2])([0][1-9]|[1-2...

How to deny foreign alphabets in utf-8 in PHP 5.x (symfony)?

I have to disable chinese, japanese, cyrillic (and so on) alphabets to be entered by users in my website, at validation time (only server side validation). At the same time I want all latin accented characters to be allowed. I use symfony 1.1 and PHP 5.2, using utf-8, of course. Any hint? ...

What are the advantages of having typed XML columns in SQL server?

From what I've read an XML column in SQL server can be typed (having a schema) or untyped. What are the advantages of using typed XML? Is it just that the XML is validated? ...

Is there a way to validate a specific attribute on an ActiveRecord without instantiating an object first?

For example, if I have a user model and I need to validate login only (which can happen when validating a form via ajax), it would be great if I use the same model validations defined in the User model without actually instantiating a User instance. So in the controller I'd be able to write code like User.valid_attribute?(:login, "logi...

UserNamePasswordValidator

I am validating users using the UserNamePasswordValidator.Validate(string username, string password) and the service is hosting itself (e.g. no IIS). The problem I have is that if the user fails the validation I want to track the users IP address. This works fine of the user gets validated, because then the OperationContext has been ini...

What characters should be restricted from a Unix file name?

Consider a Save As dialog with a free text entry where the user enters a file name as free text, then clicks a Save button. The software then validates the file name, and saves the file if the name is valid. On a Unix file system, what rules should be applied in the validation such that: The name will not be difficult to manipulate l...