Skip to content

Commit

Permalink
fix: Defaultable useless for Iron Form
Browse files Browse the repository at this point in the history
  • Loading branch information
cheleb committed Oct 4, 2024
1 parent 5508a68 commit 131bebc
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,6 @@ object Form extends AutoDerivation[Form] {
*/
given [T, C](using
validator: IronTypeValidator[T, C],
default: Defaultable[IronType[T, C]],
widgetFactory: WidgetFactory
): Form[IronType[T, C]] =
new Form[IronType[T, C]] {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,7 @@ object Validator {
given Validator[Double] with
def validate(str: String): Either[String, Double] =
str.toDoubleOption.toRight("Not a number")
given Validator[Int] with
def validate(str: String): Either[String, Int] =
str.toIntOption.toRight("Not a number")
}

0 comments on commit 131bebc

Please sign in to comment.