I have two model as follows class User < ActiveRecord::Base validates_associated :account end class Account < ActiveRecord::Base belongs_to :user #----------------------------------Validations--Start------------------------- validates_length_of :unique_url, :within => 2..30 ,:message => "Should be atleast 3 characters long!" validates_uniqueness_of :unique_url ,:message => "Already Taken" validate
![validates associated with model's error message](https://cdn-ak-scissors.b.st-hatena.com/image/square/98d6f053a97a87156775f60757c60865d0f2c47d/height=288;version=1;width=512/https%3A%2F%2Fcdn.sstatic.net%2FSites%2Fstackoverflow%2FImg%2Fapple-touch-icon%402.png%3Fv%3D73d79a89bded)