# Warning style validation

**URL:** <https://www.ruby-forum.com/t/warning-style-validation/111354>\
**Category:** Rails\
**Created:** [August 6, 2007, 2:22pm UTC](https://www.ruby-forum.com/t/warning-style-validation/111354 "2007-08-06T14:22:35Z")\
**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:** [August 6, 2007, 2:22pm UTC](https://www.ruby-forum.com/t/warning-style-validation/111354/1 "2007-08-06T14:22:35Z")

</div>

I have a requirement to add a warning message similar to an error on a  
validation. The difference being that this will allow the user to  
complete the action but just display a warning message saying “You need  
to check this now…”.

The application s a loan calcualtor allowing the user to change certain  
settings to aid different calclations. Some custom validations i have  
already are below. How would i go about displaying one of them as a  
warning message, allowing the user to complete the action but dispaying  
a message? Any advice appreciated.

def validate

#Value in custom range  
errors.add(…

#Years and Months must not equal 0  
errors.add(…

#Interest Rate set for principal  
errors.add(…

end

thanks

John B
