Skip to content

"length" validation should add "required" attribute automatically #18

Description

@kv109

Hi!

I've noticed that

validates :first_name, length: { minimum: 2, maximum: 50 }

translates to

<input maxlength="50" minlength="2" size="50" type="text">

To be 100% accurate with actual model validation, it should translate to
<input required="required" maxlength="50" minlength="2" size="50" type="text">

If you agree, I could prepare a pull request with that, are you interested?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions