diff --git a/modules/core/src/main/scala/dev/cheleb/scalamigen/Form.scala b/modules/core/src/main/scala/dev/cheleb/scalamigen/Form.scala index 092fac3..3af762f 100644 --- a/modules/core/src/main/scala/dev/cheleb/scalamigen/Form.scala +++ b/modules/core/src/main/scala/dev/cheleb/scalamigen/Form.scala @@ -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]] { diff --git a/modules/core/src/main/scala/dev/cheleb/scalamigen/Validator.scala b/modules/core/src/main/scala/dev/cheleb/scalamigen/Validator.scala index 61b6b85..5a27cf9 100644 --- a/modules/core/src/main/scala/dev/cheleb/scalamigen/Validator.scala +++ b/modules/core/src/main/scala/dev/cheleb/scalamigen/Validator.scala @@ -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") }