I’m trying to perfom validation on a liveview field but can’t wrap my mind around what the problem is
Ecto.Changeset.validate_number(:number_field, greater_than: 0)
the changeset does not return any errors when the input value is 0. It does return an error when the value is -1 to -n. I have alternatively tried using less than, here is a snippet of the same
Ecto.Changeset.validate_number(:number_field, less_than: 0)
Is there an alternative way to validate the number field to make sure it is never going to be zero.