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

Adding and removing rules to JQuery Validator based on user input?

Would like to disable the validation rules for certain fields depending on user input. Working with jquery validator plugin, is that possible at all? The JSfiddle is here: http://jsfiddle.net/webhelpla/3eQam/
aaandre
  • 2,502
  • 5
  • 33
  • 46
0
votes
2 answers

WPF/XAML - ValidationRule on GroupBox?

I have a data entry form, with its DataCountext bound to a ViewModel object. The form contains (among other things) a number of CheckBox elements, each bound to a boolean in the ViewModel. These CheckBoxes are grouped into two GroupBoxes. There are…
Jeff Dege
  • 11,190
  • 22
  • 96
  • 165
-1
votes
1 answer

Validation rule property: how to bind without using dependency properties

In my WPF MVVM app I have a TextBox which has bound a validation rule. In validation rule class I have below property: public bool CanBeValidated { get; set; } = false; Then in the view my TextBox has below validation rule bound (I only put the…
Willy
  • 9,848
  • 22
  • 141
  • 284
-1
votes
1 answer

WPF TextBox not displaying validation error message

I have bound a validation rule to my WPF TextBox in order to control what user types in. WPF TextBox:
Willy
  • 9,848
  • 22
  • 141
  • 284
-1
votes
1 answer

Setting Validation.ErrorTemplate as Style on a WPF TextBox is causing a binding error exception

In my WPF app I have a below resource: