Skip to content
This repository has been archived by the owner on Apr 19, 2022. It is now read-only.

Latest commit

 

History

History
30 lines (24 loc) · 548 Bytes

File metadata and controls

30 lines (24 loc) · 548 Bytes
permalink title category gh_url
number
number
number

Enforces the field value to be a valid whole number.

Validation fails when number has a negative value. You must use integer or float rules for that.

[casts] [label from="string", to="integer"] [/casts]

import { validations } from 'indicative/validator'
 
const rules = {
  game_points: 'number'
}
 
// or
const rules = {
  game_points: [
    validations.number()
  ]
}