Skip to content

Commit

Permalink
Remove unnecessary parameter to required
Browse files Browse the repository at this point in the history
As [`required` is a boolean attribute](https://html.spec.whatwg.org/multipage/input.html#the-required-attribute), `required(false)` would confusingly make the input required.
  • Loading branch information
veyndan committed Apr 2, 2022
1 parent a027149 commit 0a2a80f
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -194,8 +194,8 @@ fun AttrsScope<HTMLInputElement>.placeholder(value: String) =
fun AttrsScope<HTMLInputElement>.readOnly() =
attr("readonly", "")

fun AttrsScope<HTMLInputElement>.required(value: Boolean = true) =
attr("required", value.toString())
fun AttrsScope<HTMLInputElement>.required() =
attr("required", "")

fun AttrsScope<HTMLInputElement>.size(value: Int) =
attr("size", value.toString())
Expand Down

0 comments on commit 0a2a80f

Please sign in to comment.