Vigyata.AI
Is this your channel?
GithubGithub03

08 Add decimal validation rule

This PR adds the `decimal` validation rule, which I tested in Tinker and it works exactly how you’d expect. It’s great when you need strict formatting like “exactly 2 decimal places” or even a range like 1 to 3 decimal places without writing custom validation logic.

Buy on Github

You'll be taken to Github to complete your purchase.

Pros

  • +Validates exact decimal places like decimal:2
  • +Supports ranges like decimal:1,2 or decimal:1,3
  • +Reduces the need for custom validation rules

Cons

  • -You need to be explicit about the allowed decimal precision
  • -May require updating existing validation rules to match the new behavior

Featured in this video