x
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
<form action="/products" accept-charset="UTF-8" method="post"><input type="hidden" name="authenticity_token" value="-BsnS3RvZ7EzKoI7ejSXHF4CqWGWQCnUt0HTjxI1ipnz73-zv_FPoVJKmBuQIbvF9cjZFXSVx4_TfViNRv6Pdw" /> <div class="Polaris-Layout"> <div class="Polaris-Layout__Section"> <div class="Polaris-LegacyCard Polaris-LegacyCard--withoutTitle"> <div class="Polaris-LegacyCard__Surface"> <div class="Polaris-LegacyCard__Section"> <div data-errors-summary="true" tabindex="0" role="status" class="Polaris-Banner Polaris-Banner--statusCritical Polaris-Banner--withinContentContainer"> <div class="Polaris-Banner__Body"> <div class="Polaris-Banner__ContentWrapper"> <div class="Polaris-Banner__Heading"> <span class="Polaris-Banner__InlineIcon"><span class="Polaris-Icon Polaris-Icon--colorCritical Polaris-Icon--applyColor"> <svg xmlns="http://www.w3.org/2000/svg" viewbox="-2 -2 20 20" class="Polaris-Icon__Svg" focusable="false" aria-hidden="true"><path fill-rule="evenodd" d="M8 1a7 7 0 1 1 0 14 7 7 0 0 1 0-14m0 9a1 1 0 1 0 0 2 1 1 0 0 0 0-2m0-6a.75.75 0 0 0-.75.75v3.496a.75.75 0 1 0 1.5 0v-3.496a.75.75 0 0 0-.75-.75"></path></svg> </span></span> <h2 class="Polaris-Text--root Polaris-Text--headingSm Polaris-Text--semibold Polaris-Text--break"> There is 1 error with this product: </h2> </div> <div class="Polaris-Banner__Message"> <ul class="Polaris-List Polaris-List--spacingLoose"> <li class="Polaris-List__Item">Title can't be blank</li> </ul> </div> </div> </div> </div> </div> </div> </div> </div> <div class="Polaris-Layout__Section"> <div data-errors-summary="true" tabindex="0" role="status" class="Polaris-Banner Polaris-Banner--statusCritical Polaris-Banner--withinPage"> <div class="Polaris-Banner__Body"> <div class="Polaris-Banner__ContentWrapper"> <div class="Polaris-Banner__Heading"> <span class="Polaris-Banner__InlineIcon"><span class="Polaris-Icon Polaris-Icon--colorCritical Polaris-Icon--applyColor"> <svg xmlns="http://www.w3.org/2000/svg" viewbox="-2 -2 20 20" class="Polaris-Icon__Svg" focusable="false" aria-hidden="true"><path fill-rule="evenodd" d="M8 1a7 7 0 1 1 0 14 7 7 0 0 1 0-14m0 9a1 1 0 1 0 0 2 1 1 0 0 0 0-2m0-6a.75.75 0 0 0-.75.75v3.496a.75.75 0 1 0 1.5 0v-3.496a.75.75 0 0 0-.75-.75"></path></svg> </span></span> <h2 class="Polaris-Text--root Polaris-Text--headingSm Polaris-Text--semibold Polaris-Text--break"> There is 1 error with this product: </h2> </div> <div class="Polaris-Banner__Message"> <ul class="Polaris-List Polaris-List--spacingLoose"> <li class="Polaris-List__Item">Title can't be blank</li> </ul> with custom content </div> </div> </div> </div> </div> <div class="Polaris-Layout__Section"> <div class="polaris-text-field-wrapper"> <div class="Polaris-Labelled__LabelWrapper"> <div class="Polaris-Label"> <label class="Polaris-Label__Text" for="product_title">Title</label> </div> </div> <div class="Polaris-Connected"> <div class="Polaris-Connected__Item Polaris-Connected__Item--primary"> <div data-polaris-text-field-has-value-class="Polaris-TextField--hasValue" data-polaris-text-field-clear-button-hidden-class="Polaris-TextField__Hidden" data-controller="polaris-text-field" class="Polaris-TextField Polaris-TextField--error"> <input data-polaris-text-field-target="input" data-action="polaris-text-field#syncValue" class="Polaris-TextField__Input" type="text" name="product[title]" id="product_title" /> <div class="Polaris-TextField__Backdrop"></div> </div> </div> </div> <div class="Polaris-Labelled__Error"> <div class="Polaris-InlineError"> <div class="Polaris-InlineError__Icon"> <span class="Polaris-Icon"> <svg xmlns="http://www.w3.org/2000/svg" viewbox="0 0 20 20" class="Polaris-Icon__Svg" focusable="false" aria-hidden="true"><path d="M10 14a.75.75 0 0 1-.75-.75v-3.5a.75.75 0 0 1 1.5 0v3.5a.75.75 0 0 1-.75.75Z"></path><path d="M9 7a1 1 0 1 1 2 0 1 1 0 0 1-2 0Z"></path><path fill-rule="evenodd" d="M17 10a7 7 0 1 1-14 0 7 7 0 0 1 14 0Zm-1.5 0a5.5 5.5 0 1 1-11 0 5.5 5.5 0 0 1 11 0Z"></path></svg> </span> </div> Title can't be blank </div> </div> </div> </div> <div class="Polaris-Layout__Section"> <div class="polaris-text-field-wrapper"> <div class="Polaris-Labelled__LabelWrapper"> <div class="Polaris-Label"> <label class="Polaris-Label__Text" for="product_title">Title</label> </div> </div> <div class="Polaris-Connected"> <div class="Polaris-Connected__Item Polaris-Connected__Item--primary"> <div data-polaris-text-field-has-value-class="Polaris-TextField--hasValue" data-polaris-text-field-clear-button-hidden-class="Polaris-TextField__Hidden" data-controller="polaris-text-field" class="Polaris-TextField Polaris-TextField--error"> <input data-polaris-text-field-target="input" data-action="polaris-text-field#syncValue click->polaris-text-field#clearErrorMessages" class="Polaris-TextField__Input" type="text" name="product[title]" id="product_title" /> <div class="Polaris-TextField__Backdrop"></div> </div> </div> </div> <div class="Polaris-Labelled__Error"> <div class="Polaris-InlineError"> <div class="Polaris-InlineError__Icon"> <span class="Polaris-Icon"> <svg xmlns="http://www.w3.org/2000/svg" viewbox="0 0 20 20" class="Polaris-Icon__Svg" focusable="false" aria-hidden="true"><path d="M10 14a.75.75 0 0 1-.75-.75v-3.5a.75.75 0 0 1 1.5 0v3.5a.75.75 0 0 1-.75.75Z"></path><path d="M9 7a1 1 0 1 1 2 0 1 1 0 0 1-2 0Z"></path><path fill-rule="evenodd" d="M17 10a7 7 0 1 1-14 0 7 7 0 0 1 14 0Zm-1.5 0a5.5 5.5 0 1 1-11 0 5.5 5.5 0 0 1 11 0Z"></path></svg> </span> </div> Title can't be blank </div> </div> </div> </div> </div></form>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
<%= form_with(model: product, builder: Polaris::FormBuilder) do |form| %> <%= polaris_layout do |layout| %> <%= layout.with_section do %> <%= polaris_card do %> <%= form.errors_summary %> <% end %> <% end %> <%= layout.with_section do %> <%= form.errors_summary(within: :page) do %> with custom content <% end %> <% end %> <%= layout.with_section do %> <%= form.polaris_text_field(:title) %> <% end %> <%= layout.with_section do %> <%= form.polaris_text_field(:title, clear_errors_on_focus: true) %> <% end %> <% end %><% end %>No notes provided.
No params configured.