Skip to content

Rails built-in alternative #1

@olliebennett

Description

@olliebennett

The validates_numericality_of method may be useful as an alternative to these manual approaches :)

validates_numericality_of :passport, only_integer: true

Alternatively, using the numericality option of the standard validates method;

validates :passport, numericality: true

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions