Questions tagged [validationrules]

A validation rule is a criterion used in the process of data validation, after the data has been encoded onto an input medium. This is distinct from formal verification, where the operation of a program is determined to be correct per the specification.

A validation rule is a criterion used in the process of data validation, after the data has been encoded onto an input medium. This is distinct from formal verification, where the operation of a program is determined to be correct per the specification.

An example of a validation check is the procedure used to verify an ISBN:

  1. Size. The number of characters in a data item value is checked; for example, an ISBN must consist of 10 characters only (in the previous version – the standard for 1997 and later has been changed to 13 characters).

  2. Format checks. Data must conform to a specified format. Thus, the first 9 characters must be the digits 0 through 9, and the 10th must be either one of those digits or an X.

  3. Consistency. Codes in the data items which are related in some way can thus be checked for the consistency of their relationship. The first number of the ISBN designates the language of publication. for example, books published in French-speaking countries carry the digit "2". This must match the address of the publisher, as given elsewhere in the record.

  4. Range. Does not apply to ISBN, but typically data must lie within maximum and minimum preset values. For example, customer account numbers may be restricted within the values 10000 to 20000, if this is the arbitrary range of the numbers used for the system.

  5. Check digit. An extra digit calculated on, for example, an account number, can be used as a self-checking device. When the number is input to the computer, the validation program carries out a calculation similar to that used to generate the check digit originally and thus checks its validity. This kind of check will highlight transcription errors where two or more digits have been transposed or put in the wrong order. The 10th character of the 10-character ISBN is the check digit.

Source: Wikipedia

189 questions
0
votes
1 answer

Yii2 concatenate a variable to String in whenClient

I am using a dynamic form with validation rules and I want to make the browser validate also the form before it submit so I used whenClient. There is a checkbox that when clicked, will not process validation... ['dv_number', 'required', 'when' =>…
beginner
  • 2,024
  • 5
  • 43
  • 76
0
votes
1 answer

Add ValidationRule in XAML from code behind

I am trying to add a ValidationRule to XAML from code behind and and need to have this:
mkdavor
  • 135
  • 4
  • 16
0
votes
2 answers

Need design guidance for implementing Drools rules

I am using Drools 6.1.0 in my application. We are planning to write a single huge .drl file which will contain all the rules. There will be mainly 2 categories of the rules 1. Null checks 2. Business validation Using ruleflow-group,…
Shantanoo K
  • 765
  • 5
  • 15
  • 43
0
votes
0 answers

How to change custom validation rule file name laravel 4.2

I want to move all validation.php custom error messages to another file, so how do i change the default file name (app/lang/en/validation.php) to use custom filename. when i move the error message to another file, instead of the actual error message…
sam
  • 271
  • 6
  • 23
0
votes
0 answers

DataGridTextColumn ValidationRules doesn't trigger Validation.HasErrorProperty

I have a DataGrid with DataGridTextColumn on which I have a ValidationRule
Ecnerwal
  • 362
  • 1
  • 2
  • 15
0
votes
1 answer

bind user control to contentcontrol validation rules not firing

I have many user controls and i have main window which contains a content control and list box when user select from list box i bound the selected user control to the content control the problem is when the user control bound for the first time the…
am shammout
  • 195
  • 3
  • 11
0
votes
0 answers

Using Access Next Record to Cycle through records that have a certain field as null

So I'm running into trouble, I'm trying to use Next and Previous record buttons (using prebuilt macros) to cycle through the ID of different resources. However, I'd like it to go through ONLY the Records where "TimeReturned" in Table "Loans" is…
clovisd
  • 7
  • 1
  • 4
0
votes
2 answers

In Laravel 4, How are the merging rulesets implemented?

I'm using the dwightwatson/validating package to create validation rules in the model. I particularly like the custom rulesets you can create for different routes. Model protected $rulesets = [ 'set_up_all' => [ 'headline' =>…
zeckdude
  • 15,877
  • 43
  • 139
  • 187
0
votes
2 answers

Store Business Rules in XML Document, Validate afterwards in Java, how?

Example XML Rules document: How do I…
JavaPete
  • 63
  • 1
  • 1
  • 4
0
votes
2 answers

Best practices: what should an "IsValid" boolean function return when passed a null argument?

Given a bool validation function that takes an argument and returns true or false based on argument's compliance to some internal rules: if the argument is null, should the function: return false return true do neither and simply raise a…
Louis
  • 705
  • 10
  • 18
0
votes
0 answers

Wpf Validation rule force update

I'm have a hard time trying how to figure out a problem with a validation Rule, I have a datagrid with some columns, and the columns can't have a same value in different rows, I can display a error in one of the duplicate rows, but the problem is,…
0
votes
1 answer

ValidationRule not firing

I am having problems with validations and so far its been a real struggle. I changed around some code and read a lot about this, and followed this guide most of the road: http://developingfor.net/2009/10/13/using-custom-validation-rules-in-wpf/ but…
Lord Relix
  • 922
  • 5
  • 23
  • 50
0
votes
1 answer

Validation rules/Expected inner text in Load Test Project VS 2012

Is there an option like "contains" or "like" in sql for validating just a fragment of text. I need to validate just a part of the code that's static, the rest is dynamic.
0
votes
1 answer

Restrict email recipients based on email keyword in MS Outlook 2010

I work in a medical study where study coordinators at several off-site locations will be sending sensitive data via email attachments. These emails will be encrypted, but I cannot have the emails going to anyone but one or two specific recipients. …
0
votes
1 answer

WPF - ValidationRule is not being called

I got this Xaml of a TextBlock:
CodeMonkey
  • 11,196
  • 30
  • 112
  • 203