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