Questions tagged [validationrule]

53 questions
1
vote
1 answer

How do I check if all textboxes inside ItemsControl are valid

I have this template for an itemscontrol:
Talha Talip Açıkgöz
  • 1,821
  • 4
  • 15
  • 28
1
vote
1 answer

Image validation rule not working as expected

Here's my validation rule: public function rules() { $channel_id = Auth::user()->channels->first()->id; return [ 'name' => 'required|max:30|unique:channel,name,' . $channel_id, 'slug' =>…
Pritam Bohra
  • 3,912
  • 8
  • 41
  • 72
1
vote
1 answer

Salesforce Validation Rule - Allow certain user & profile to modify record after it's been approved

I've looked for answers and even looked at a lot of our other validation rules but can't quite seem to finish this off. I feel like I'm almost there but I can't get my syntax correct. I'm trying to write a Validation Rule that would allow a…
Ryan McKnight
  • 11
  • 1
  • 3
1
vote
1 answer

how to pass a dynamic value for ValidationRule Class

I am new in wpf and i trying to make a validation textbox of some showdialog window. i already make a validation for empty dield and spaces but i need to add a validation for numbers that bigger than some max value that i passed to the dialog but…
yosi
  • 23
  • 6
1
vote
3 answers

Binding to a ValidationRule in WPF

I am new to WPF. The form's data context includes a StartTime and an EndTime field (using MVVM), which I have successfully bound to their own text boxes. I am trying to create a validation to check that a new user-entered StartTime is before the…
zambonee
  • 1,599
  • 11
  • 17
1
vote
0 answers

Pass TextBox.Tag into its own ValidationRule

I would like to use the TextBox's 'Tag' property to store invalid characters (or eventually a Regex string) for validation of the text. In my simple example, I'm checking the TextBox text for any instances of 'A'. I have my custom ValidationRule…
1
vote
1 answer

Does System.Windows.Controls.ValidationRule only support Value Types for properties

I am using following System.Windows.ValidationRule. public class XXXValidationRule : ValidationRule { public object FooObject { get; set;} public override ValidationResult Validate(object value, System.Globalization.CultureInfo cultureInfo) …
kbisang
  • 558
  • 4
  • 13
1
vote
2 answers

ValidationRule Red Border Issue

In my WPF Application, I have created ValidationRules for my TextBoxes so that it will not allow an empty string which works fine and shows a red border with text telling the user it can not be empty. When the application launches, all the fields…
barakisbrown
  • 1,293
  • 3
  • 9
  • 15
1
vote
0 answers

WPF DataGrid on validation error, how to disable buttons on view

I have set up my own ValidationRule so when some validation fails inside a Datagrid, an error appears and you need to correct that error to continue to edit the rest of the grid. Perfect. However, you can still "Save" with this error still present.…
user3428422
  • 4,300
  • 12
  • 55
  • 119
1
vote
1 answer

Access validation rules Date/Time

I need to set up a small database as an assignment after 3 hours of an access introduction and I'm failing completely. However I youtubed several hours but still no change in the outcome. Do I try to implment too many excel functions into access? My…
Nina
  • 11
  • 1
  • 1
  • 4
1
vote
1 answer

Is ValidationRule able to prevent Control status from being updated?

Maybe I am not using ValidationRule correctly, if so, please show me the correct way. Currently, I have implemented a class WarningForUncheckRule inherited from ValidationRule, and bind it to a binding.
winterTTr
  • 1,739
  • 1
  • 10
  • 30
1
vote
1 answer

PasswordControl and manually showing ValidationRule error

I have custom ValidationRule that returns can error when the entered text is too short. This works fine for a standard TextBox because the Text property can be bound to a source and then the rule added to the binding. When the user enters a string…
Phil Wright
  • 22,580
  • 14
  • 83
  • 137
1
vote
1 answer

Parent Child ValidationRule

I have a complicated scenario using ValidationRules that I need some help with. I have a User Control that is roughly organized like this: Parent (ItemsControl) Child 1 Property 1 Property 2 Child 2 Property 1 …
tonic889
  • 11
  • 2
0
votes
1 answer

TextBox is empty but ViewModel still contains the last character when using ValidationRule

I have a TextBox, and I am using ValidationRule.
Polar
  • 3,327
  • 4
  • 42
  • 77
0
votes
1 answer

Magento 2: How to Implement Validation in UI-Component with parameters

Ok. Everyone's got an answer on how to add validation rules to a ui-component field via XML. Unfortunately, I can't find anyone that seems to know how to implement a rule that requires a parameter or two. I'm sure the knowledge is out there, but…
Toby Crain
  • 111
  • 2
  • 4