192
questions
0
votes
1
answer
41
views
How to pass information from the view model to a validation rule
I'm quite new to programming C# and WPF. I have two TextBoxes where I want to validate user input with validation rules:
<TextBox
x:Name="TextBox1">
<TextBox.Text>
...
0
votes
1
answer
61
views
I want to add a Validation rule to prevent a date prior to todays date
The below is what I am supposed to do:
Please label this field as “Date of Mailing” on the UI
This field should display under Cancellation Effective Date
The name should be dateOfMailing
The default ...
0
votes
1
answer
50
views
Why isn't my validation api or validation annotations working in my project?
Here are my 2 domain classes:
package tacos;
import java.util.List;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import lombok.Data;
@Data
public class Taco {
...
0
votes
0
answers
22
views
Validation rules to prevent record creation
I've got 2 objects Opportunity (standard) and billing schedule (custom). We want to prevent record 'Billing schedule' creation by a certain user (profil) when the opportunity stage name is : Win or ...
0
votes
1
answer
55
views
How can I bind a ValueRange Maximum and Minimum using Dependency property?
I'm working with a user control that includes a shared DataGrid used by multiple user controls. To customize the 'Maximum' and 'Minimum' values for each user control, I've implemented Dependency ...
0
votes
1
answer
39
views
ValidationRule with UpdateSourceTrigger=LostFocus not firing when textbox loses focus
I am attempting to implement validation for form data in a WPF application.
View
<StackPanel Orientation="Horizontal" Margin="0 5 0 5">
<TextBlock Style="{...
0
votes
1
answer
62
views
WPF. Duplicat ValidationRule for collection items
I have ObservableCollection and ItemsControl
public ObservableCollection<SomeData> Datas { get; }
I`am trying to validate a duplicate exists.
<ItemsControl ItemsSource="{Binding Datas}...
0
votes
0
answers
83
views
Data validation doesn't work in a calculated field in Access Form
I am having problem in data validation in one of my continuous subforms. There is a total score (TScore) field which is calculated (total of "Score" field) and a max score (MaxScore) field. ...
0
votes
1
answer
2k
views
Salesforce Opportunity Stage Validation Rule - Admin to edit everything, Users to close but not edit anymore
I don't have any experience with Validation Rules on SFDC and I am looking for a validation rule that would allow a ProfileID = System Administrator to be able to close, edit, reopen a Closed/Won ...
1
vote
0
answers
1k
views
Laravel 8.x Password Defaults Validation
I am trying to use the Laravel's Rule\Password::defaults($callback) to add validation rules for registering users.
As per documentation of the defaults function:
Set the default callback to be used ...
0
votes
1
answer
144
views
How did we combine a sequence to commit branches in GitLab?
I'm facing syntax issue
($CI_COMMIT_BRANCH =~ /^[A-Z][0-9][-_]SPRINT[0-9]+/i)
($CI_COMMIT_BRANCH =~ /^SPRINT[0-9]+/i)
($CI_COMMIT_BRANCH =~ /^[A-Z]SPRINT[0-9]+/i)]
(SPRINT-branch name) can you please ...
-1
votes
1
answer
482
views
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 ...
-1
votes
1
answer
817
views
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:
<TextBox Grid.Column="0"
Grid.Row="1"
...
-1
votes
1
answer
638
views
Setting Validation.ErrorTemplate as Style on a WPF TextBox is causing a binding error exception
In my WPF app I have a below resource:
<ResourceDictionary>
<Style x:Key="OnErrorTextBoxStyle" TargetType="{x:Type TextBox}">
<Style.Triggers>
...
1
vote
1
answer
299
views
How do I validate email in array laravel
I am sending data request in this format to my laravel backend application
array:2 [
0 => array:2 [
"email" => "[email protected]"
"role_id" => 2
]
1 =&...
0
votes
0
answers
115
views
Validate if one date passes through another - Yii 2
It happens that I have a table where I keep records of things that are going to be done at a certain date and time, where I have the attributes: id, task, StartDate, EndDate.
What I want is that no ...
0
votes
2
answers
571
views
Laravel 8 url segment always return null
I created a validation for the creation and editing forms using Laravel's Request.
But I use the same form for creating and editing. So I created an exception so that when the url id is equal to the ...
0
votes
1
answer
200
views
How to disable validation of a combox element when visibility is collapsed?
I want to disable the validation of a ComboBox or a TextBox when their visibility is collapsed. Can I realize this within the XAML code?
<ComboBox Name="XYZCb" ItemsSource=&...
3
votes
1
answer
119
views
Laravel - How to make unique two fields using rules request
In Laravel-8 I have this unique rules request validation:
public function rules()
{
return [
//company
'companyName' => [
'required',
'string',
...
-1
votes
1
answer
2k
views
Laravel Rule ignore and deleted_at null
I have a validation rule in my update function
Rule currently selects unique from deleted rows.
I have row soft deleted.
Validation Rule should ignore soft delete and check unique and also ignore ...
1
vote
1
answer
1k
views
Rules should return a string or boolean, received 'object' instead when using more then one rule
I'm trying to validate a vuetify v-text-field. I have two rules, one for required field and the other for validating thar user only enters positive numbers. But it doesn't work, I get this error:
[...
0
votes
1
answer
970
views
Laravel exists custom validation rule unable to validate user id with phpunit
I have a validation rule taken from the Laravel Documentation which checks if the given ID belongs to the (Auth) user, however the test is failing as when I dump the session I can see the validation ...
0
votes
1
answer
57
views
Using ValidationRule to validate values in WPF is stopping setting values in textboxes if they are not correct and retaining the last correct value
I'm using validationrule class to validate my textbox values against length. It works fine and show the error also if it is invalid but the problem is if users are editing the textbox it is not ...
-2
votes
1
answer
2k
views
Invalid rule in CodeIgniter 4
I'm trying to create an update page for users. The firstname and lastname are getting updated successfully, but when I try to update the password it gaves me an error which says that the rule is not a ...
0
votes
1
answer
2k
views
Laravel 7 empty array validation
I'm trying to validate a required (possibly) empty array in my FormRequest.
I'm usign the present and array validation rules, since i want the value to be passed, but it coul be an empty array.
The ...
0
votes
1
answer
2k
views
How to check email is exist in vuetifyjs rules
I am use vuetify form validation with rules
I have a problem in asynchronous validation of email existed
This code for rule:
data () {
return {
rules: {
email: value => {
...
0
votes
2
answers
1k
views
Run WPF Validation only if control is Visible (Disable validation if control is Collapsed)
I want to make WPF validations run only if the control that is being validated is Visible.
In my project, depending on the user's choice, some controls are Collapsed.
I have a button that is enabled ...
0
votes
1
answer
443
views
Validate selection of at least one checkbox using model rules. Yii2
I am using the following code to validate that I have at least one checkbox selected but I have a problem.
JS
$("#btn_enviar").click(function() {
var invalido = 0;
$(".item&...
1
vote
1
answer
246
views
Extending a TextBox prevents ValidationRule error tooltip from appearing WPF
I'm rather new to WPF and XAML, and I'm attempting to create a custom class that extends TextBox, so that I can add some properties for easier validation setup. The validation works fine. The problem ...
2
votes
1
answer
692
views
Use `trans_choice()` in request validation messages with validation rule parameter
I need a request validation rule to return a custom message upon failure, and since the field being validating is an array with a min:x rule i'd like to have a custom message for both singular and ...
1
vote
1
answer
876
views
Nested alternative validation required_without in laravel 5.8
here is my request
{
"formulations": [
{
"formulation_id": null,
"formulation_custom_name": "test",
"meal_time_id": null,
"remark": "demo1"...
0
votes
1
answer
198
views
Table validation rule error: Unknown function 'Nz' in validation expression or default value on 'TableName'
In Microsoft Access, I am trying to enforce table validation to have one and only one foreign key filled using table validation rule on Long Integer ...ID fields:
Nz([MeasurementPointID], 0) = 0 Xor ...
0
votes
1
answer
308
views
Can you have more than one indicator in an XSD complex element?
I'm trying to build a new schema to validate XML against for my job. But I'm having a hard time answering the question: can I and how do I create a complex element that has some elements that need to ...
2
votes
2
answers
7k
views
Laravel - How to validate Unique Rule Request as case sensitive
I have this Rules in my Laravel-5.8
Rules: create
public function rules()
{
return [
'location_name' => [
'required',
'string',
'min:3',
'max:80', ...
-1
votes
1
answer
219
views
DesignTime Error Wpf ValidatesOnTargetUpdated NullReferenceException
I have the same question as in the link below, but the answers where not satisfying for me.
ValidationRule ValidatesOnTargetUpdated NullReferenceException at Design Time
XAML
<TextBox x:Name="...
1
vote
1
answer
350
views
WPF TextBox IValueConverter ConvertBack not triggered when ValidationRules fail
I have a TextBox which is linked to a double? in my backend viewModel. I need the ConvertBack to trigger when I empty the TextBox, but the validationRule "ValidateNotNullOrWhiteSpace" fail so there is ...
0
votes
2
answers
883
views
Find data before validate form request laravel
I want to update the data using the request form validation with a unique email role, everything works normally.
Assume I have 3 data from id 1-3 with url:
127.0.0.1:8000/api/user/update/3
...
5
votes
1
answer
2k
views
Laravel required_without validation rule in array
Let's say i have an object composed of property_a and property_b, and when submitted have to receive at least one of those two properties.
If the object were just one i could use the required_without ...
0
votes
2
answers
5k
views
Laravel validation rules only ids that belong to a selected related model
Below is a sample of database tables.
posts table:
id name
1 A
2 B
comments table:
id post_id text
1 1 aaaaaaa
2 1 ...
0
votes
1
answer
165
views
Unwanted validation rule being applied on password reset
I'm trying to use the password reset ability of Laravel's authentication. After running make:auth command, inside my ResetPasswordController, I have overridden rules function of Illuminate\Foundation\...
0
votes
1
answer
178
views
Laravel 5.8 Custom Rules - Return False vey slow
TLDR; Why does my app take 30+ seconds to reload when a custom rule returns False, whereas less than 1 second when true?
I made a custom Rule in my Laravel 5.8 app. Whenever it returns true, it takes ...
7
votes
2
answers
3k
views
How to override the message of the custom validation rule in Laravel?
I am developing a Laravel application. What I am doing in my application is that I am trying to override the custom validation rule message.
I have validation rules like this in the request class:
[
...
0
votes
1
answer
918
views
WPF validation error remains until control loses focus
I got a text box on which I added a validation rule in the xaml. The rule works and it detects errors, but only after the user gives the focus to some other element in the window, like another text ...
0
votes
1
answer
415
views
How to create a validation rule referencing two lookups
I would like to create a validation rule or similar that controls if a record already exists with the same two lookup values, that the start date has to be the day after the end date of the previous ...
0
votes
1
answer
134
views
CodeIgniter 3.1.9 Form Validation
I have a problem with a form validation in CI.
The rule seems does not call the function
My code is the following:
[...]
$this->form_validation->set_rules('last_name', 'last name','trim|...
6
votes
1
answer
4k
views
What do "except" and "idColumn" refers in "unique:table,column,except,idColumn"? from Laravel docs
To validate the update of the e-mail of a user already registered I have the next function to exclude the "unique" rule for the current User:
public function updateRules() {
return [
'...
0
votes
1
answer
172
views
How can i check the validations in a view on a button click?
We are making a project to the university with some of my classmates. We have to do a desktop application and we've got some problem with it. It was basically very difficult to understand the MVVM, ...
2
votes
1
answer
92
views
WPF ValidationTule with binding parameter problem
I need to pass a bind value to my validation rule. This is the XAML code:
<Label Grid.Column="11" Content="Default" Style="{StaticResource labelStyle2}" x:Name="txtTipo" />
<TextBox Grid....
0
votes
1
answer
467
views
jQuery rules validation with ajax request
This question already asked but that not working.
I want to use jQuery rules validation with show Zone Name Already Exist...! message using Ajax. I tried submitHandler but that not working.
This is ...
0
votes
1
answer
2k
views
WPF ValidationRule prevent last value to be set
I use a validation rule on a TextBox to validate the user input string.
The Text is binding to a float property on the view model and the WPF binding engine is keen enough to auto convert the string ...