Skip to content

Commit f8b8561

Browse files
authored
Merge pull request #3680 from AlchemyCMS/backport/8.1-stable/pr-3679
[8.1-stable] Fix required field indicator to only show for presence validations
2 parents 266433c + ff2b53d commit f8b8561

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

app/components/alchemy/ingredients/base_editor.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ def ingredient_role
178178
content = "#{icon} #{content}".html_safe
179179
end
180180

181-
if ingredient.has_validations?
181+
if presence_validation?
182182
"#{content}<span class='validation_indicator'>*</span>".html_safe
183183
else
184184
content

spec/components/alchemy/ingredients/base_editor_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@
186186
end
187187

188188
it "does not show any validation indicator" do
189-
is_expected.to have_selector(".validation_indicator")
189+
is_expected.to_not have_selector(".validation_indicator")
190190
end
191191
end
192192
end

0 commit comments

Comments
 (0)