i have a auto complete field for my authority_id field.authority_id
field is not mandatory.if the user not fills it will take the default
authority id as value.
but i want to validate if the user enters invalid authority name into
the auto complete text box...
i can do this in my controller...
but how can i implementd as modal validation.
pls help on this
below is my controller side implementation
#if autority text box is empty?
@user = UserInfo.find_by_login('admin')
@company.authority_id = @user.id
authority = UserInfo.find_by_login(params[:user_info][:login])
flash[ :error ] = "*Please Enter valid Authority name"
@company.authority_id = authority.id
some one pls help me...