[Bug] `repeatable` subfield error messages are a bit odd
See original GitHub issueBug report
What I did
Made a repeatable
subfield required (using nested array validation, present in 4.2).
What I expected to happen
Nice error message when “quantity” subfield is missing.
What happened
I wonder if there’s anything we can do to
- turn
The items.0.quantity field is required
- into
the item quantity field is required for row 0
Or… I don’t know… maybe even something better than that. At least a way to tell people "define this in your FormRequest’s messages()
.
What I’ve already tried to fix it
Nothing. In a rush to ship 4.2.
Is it a bug in the latest version of Backpack?
4.2
Issue Analytics
- State:
- Created 2 years ago
- Comments:5 (5 by maintainers)
Top Results From Across the Web
Control Subfields - OCLC
Definition. The subfields included here are used to provide various identifiers, relationships, and sources of terms and codes.
Read more >Bug 28445: Use the task queue for the batch delete ... - Koha
To use with items_table_batchmod BLOCK (still from html_helpers.inc) This patch is fixing some bugs about repeatable subfields and regex.
Read more >Chapter 3. Data, Tables, and Database Design - O'Reilly
The essence of data normalization is just this: pull out repeating and ... to put data into it, Access gave me a "primary...
Read more >Understanding MARC Bibliographic: Parts 7 to 10
For full listings of all MARC 21 tags, indicators, and subfield codes, see MARC 21 ... If it can only be used once,...
Read more >Authority toolkit: create and modify authority records
(The toolkit will attempt to assign the appropriate subfield code, and will ... The toolkit does something that may seem a bit unusual...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@niladam for a field you validate with:
'repeatable.*.field_name'=> 'required'
you can put in your messages:repeatable.*.field_name.required => 'this field is required'
.The PR that works on this is: https://github.com/Laravel-Backpack/CRUD/pull/4220/files but is mainly so that you can validate directly on the fields with
validationRules => 'required'
and it will process it to be usable in a FormRequest. . For a FormRequest validation is standard laravel nested input validation https://laravel.com/docs/9.x/validation#validating-nested-array-inputI think this is done. 👍
I’ve just tested repeatable messages and everything is displaying correctly.
This was a misunderstanding on how to display repeatable messages.
I am closing this, please re-open if you guys think I am wrong.
Cheers