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

How to validate different model fields in one form in ?Yii

I have two models 1)TblRegistration : $model as object -director -experience -language 2)TblLogin : $model2 as object -email -password Both fields are included in TblRegistration/_form.php By defaut TblRegistration fields validation is…
0
votes
0 answers

DependencyProperty Binding with ValidationRule not updating Source when ValidationResult is false

A ComboBox.SelectedItemProperty is bound TowWay to a DependencyProperty in The Control. In the ControlTemplate :
eran otzap
  • 12,293
  • 20
  • 84
  • 139
0
votes
1 answer

Multiple Validation Scenarios for EntLib - .resx style?

Currently I've got a set of EntLib validation rules defined in my classes. The rules will later change based on the client. What I'd like to do is retain my classes, and simply call the different rule sets defined somewhere for the specific…
ElHaix
  • 12,846
  • 27
  • 115
  • 203
0
votes
1 answer

How to use the previous value when validating a WPF DataGrid cell entry?

I have a WPF DataGrid. I would like to restrict the values a user may enter in a particular column, such as the following: Column A values may only increase (new value > old value). Column B values may only decrease (new value < old value). If the…
DTayntor
  • 31
  • 1
  • 4
0
votes
1 answer

Generate Number with Validating rule in Access

I have a database in access for institute. there is a [Registers] Table and [Certificates] Table. I want to give Mark to each of Registers a Mark. I want to set Validation Rule for Each If [Certificates].[Mark]>70 Then…
0
votes
2 answers

Error while adding validation rules class to binding

I wanted to add validation rules to textBox ,the problem is that when I do the following code I got the following error message, A value of type 'myValidations' cannot be added to a collection or dictionary of type 'Collection`1'. The class…
John Jerrby
  • 1,683
  • 7
  • 31
  • 68
0
votes
1 answer

Can you safely return null from a custom ValidationRule, to signify no validation performed?

I am implementing a custom ValidationRule for WPF DataBinding. To do this, I just inherit from ValidationRule and implement one or more of a few abstract or virtual methods. This is the method I am implementing: public override ValidationResult…
TCC
  • 2,546
  • 1
  • 24
  • 35
0
votes
1 answer

Jquery validation in IE 8 - Object doesn't support this property or method for drop down box

I'm using jquery validation to validate my form. It works well on text box but when I try to validate a drop down, it throws me an "Object doesn't support this property or method" error in IE 8 only. It works fine in FF or Chrome. Not sure if I…
suipor
  • 3
  • 2
0
votes
1 answer

WPF ValidationRule for StartDate and EndDate

In my WPF application I need to compare two textbox fields (say startDate and enddate) -- I am not using DatePicker-- using Validation-Rules. Is there any workarounds to approach this? Thanks in advance...
amir moradifard
  • 353
  • 1
  • 8
  • 26
0
votes
1 answer

Validating A WPF Datagrid Against Data From Another Datagrid

Is there a way using WPF ValidationRules to validate the updated field with the data in another datagrid on the same form? My page looks like this: Ranges Min Max 1 10 Rank 5 So in this situation the Rank is updated and I need to make sure it…
Stevenr12
  • 108
  • 7
0
votes
1 answer

Restricting user from chosing a value in picklist

I am having a requirement in the sales force where the user has to chose values from picklist.But the twist is the user has to select first received and then only it has to allow user to select recived.Can anyone tell me how to achieve this…
kumar
  • 127
  • 1
  • 11
0
votes
1 answer

Yii validation rules for custom CFormModel not working

I have this cformmodel:
Ionut Flavius Pogacian
  • 4,750
  • 14
  • 58
  • 100
0
votes
1 answer

Yii rules() match failing

I've had a working registration/update model, I wanted to expand on my models so I added in a regex to the password field. I have checked the regex works online and even my client side validation shows it works, but the model refuses to save now.…
Jonnny
  • 4,939
  • 11
  • 63
  • 93
0
votes
1 answer

Building a Custom Combobox with built in ValidationRules

I am working on a WPF application. And we have a number of "forms" within the application that have fields that require entry. I have read all about ValidationRules and I think I am grasping the concept well enough, but what I would like to do is…
Matt
  • 2,795
  • 2
  • 29
  • 47
0
votes
1 answer

Custom ValidationRules inside Expander.Header Binding not firing

I am having trouble getting a custom ValidationRule to fire, when it is associated with an Expander.Header binding. In fact, the only place I can seem to get these custom rules to fire is in a DataGrid.RowValidationRules block... The expander is…
RJ Lohan
  • 6,497
  • 3
  • 34
  • 54
1 2 3
12
13