Closed charlie-goldenowl closed 2 months ago
Hey @charlie-goldenowl! We don't check for allow_blank: true
in required helper because using allow_blank
with presence validation doesn't make much sense (I'm not even sure this combination works properly). It's usually used with something like length
validation:
validates :title, length: { is: 5 }, allow_blank: true
Precheck
https://github.com/heartcombo/simple_form/blob/86429bceb950096df3c29616f31bd5a5ce706c06/lib/simple_form/helpers/required.rb#L22 how we can remove required class for this case bellow
Environment
Current behavior
Include code samples, errors, steps to reproduce the error and stacktraces if appropriate.
Will be even more helpful if you provide a sample application or a test case that reproduces the error.
Expected behavior