All Questions
Tagged with rules validation
146
questions
0
votes
0
answers
48
views
Maatwebsite Rules Validation Failed on Import Data from Excel File on Laravel 10
Recently, I have been working on the project that needs to enable users to import data using the excel template file. I provided the excel file which contains the header like as the followings :
...
0
votes
1
answer
44
views
How to fix validation rule for jira-maven-plugin
I use the jira-maven-plugin to create a plugin for JIRA
<build>
<plugins>
<plugin>
<groupId>com.atlassian.maven.plugins</groupId>
<...
0
votes
0
answers
24
views
Can I check file existence using PMD rules?
I want to check if files existence using PMD rules, such as (gitignore, version, readme, . . . ) files.
What is the recommended way to do so?
I searched for the java rules and xpath rules in pmd but I ...
0
votes
1
answer
273
views
Yii2 apply validation rule on array of attributes
I use Yii2 and model rules for validation.
I have an $id attribute which is an hash value. The validation rule looks like this:
return [
['id', 'match', 'pattern' => '/^[a-f0-9]{16,32}$...
0
votes
0
answers
58
views
Laravel Rule exists don't work with array
This is my validation rule, but with an invalid data they allow pass.
'curso_inteligencia_id' => [
'nullable',
'array', ...
0
votes
1
answer
84
views
Laravel uniqueness validation of hasMany
I need to validate with the rule unique all code of the list of children before update, I know how to do it for the parent:
$parent = Parent::find($id);
$childrens = $parent->childrens;
...
0
votes
0
answers
153
views
Nested array validation rules not working on update in laravel
I have an array like this
"fio" => "John Dou"
"city" => "1"
"birthday" => "2022-10-21"
"email" => "test@...
0
votes
1
answer
62
views
Yii2 how to handle required field one of two for two different models
I have two forms to validate for phone number and email where input fields I am generating with \kidzen\dynamicform\DynamicFormWidget
Phone number form rules:
<?php
namespace common\models\form;
...
1
vote
0
answers
141
views
Laravel exists validation: Should not pass when user and product are already stored
I have a product_votes table which stores for each user and product a value. The value can either be 1 or -1 which is equal to an upvote or downvote. A user can only either up- or downvote a product ...
1
vote
1
answer
943
views
laravel validation, Rule::exists or Rule::in
I want to validate sequence of items. In my idea sequence field must be exists in database sequence column or must be one plus more than maximum of present sequence.
I have this code in view:
<...
0
votes
1
answer
67
views
DMN rule for checking reference data
New to dmn rule and trying to evaluate a condition.
Suppose I have 2 input tables.
Input A has keys - keyA1, keyA2
Input B has keys - keyB1, keyB2
I want to find out if each row in Input A has ...
0
votes
1
answer
129
views
Lock States in Salesforce
How can I do with a validation rule so that, for example, from the New state I only get to click Assigned. The rest of the states should give an error message or blocked (I don't know if it can be ...
1
vote
1
answer
1k
views
Laravel unique validation for combined multiple fields by custom logic
I am currently using Laravel 9 for my project.
Here is my validation rules
public function rules()
{
$parent_id = $this->parent_id != 0 ? $this->parent_id : null;
return [
'name'...
0
votes
1
answer
480
views
Laravel validation Form - Don't accept number into double quotes
I have this POST request:
{
"documentType": "1",
"metadata": []
}
And i have this validation rules:
const POST_RULES = [
'documentType' => 'required|int',
...
0
votes
1
answer
1k
views
Laravel validation if both field are empty then error . But if one is null then other is required
I am trying to make a rule if one is empty or not present then other is required but if both are not present then it give error.
I have used this but if both are empty then it not give any error
'...