# Validate all model fields with validates\_numericality\_of

**URL:** <https://www.ruby-forum.com/t/validate-all-model-fields-with-validates-numericality-of/128875>\
**Category:** Rails\
**Created:** [February 12, 2008, 10:43am UTC](https://www.ruby-forum.com/t/validate-all-model-fields-with-validates-numericality-of/128875 "2008-02-12T10:43:10Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![johnnybutler7](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/8491ac/32.png) [@johnnybutler7](https://www.ruby-forum.com/u/johnnybutler7)\
**Post date:** [February 12, 2008, 10:43am UTC](https://www.ruby-forum.com/t/validate-all-model-fields-with-validates-numericality-of/128875/1 "2008-02-12T10:43:10Z")

</div>

hi,

I have a rather big table and i need to validate every decimal field in  
the table to make sure its numeric. Can anyone think of the best way to  
do this or is it even possible?

I dont want to write validates\_numericality\_of: and then each field in  
the table seperately.

JB
