# Validations and ACL

**URL:** <https://www.ruby-forum.com/t/validations-and-acl/187795>\
**Category:** Rails\
**Created:** [April 29, 2010, 11:25am UTC](https://www.ruby-forum.com/t/validations-and-acl/187795 "2010-04-29T11:25:48Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![serpico](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/7feea3/32.png) [@serpico](https://www.ruby-forum.com/u/serpico)\
**Post date:** [April 29, 2010, 11:25am UTC](https://www.ruby-forum.com/t/validations-and-acl/187795/1 "2010-04-29T11:25:48Z")

</div>

Hi,

I’m creating a rails app which requires an authentication system based  
on an Access Control List.  
Basically I have a User model associated to a Role model where every  
user has one and only one role.

The problem I’m facing right now is with the creation of new users and  
validation. The role has to change the validation applied to a user  
fields on creation (and update), for instance a user having role  
“employee” is forced to provide information about its phone number,  
while a “manager” doesn’t need to provide it.

Is there a clean way to solve this without applying conditions to every  
validated field for every role?

Thank you
