# GeoKit / Form Validation

**URL:** <https://www.ruby-forum.com/t/geokit-form-validation/142338>\
**Category:** Rails\
**Created:** [July 7, 2008, 12:20am UTC](https://www.ruby-forum.com/t/geokit-form-validation/142338 "2008-07-07T00:20:02Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jeff.Corcoran](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/bc79bd/32.png) [@Jeff.Corcoran](https://www.ruby-forum.com/u/Jeff.Corcoran)\
**Post date:** [July 7, 2008, 12:20am UTC](https://www.ruby-forum.com/t/geokit-form-validation/142338/1 "2008-07-07T00:20:02Z")

</div>

I am new to rails and have been scouring the web for the past two days  
trying to figure out 2 things.

1. I am currently using a form with 2 models. The first is person, the  
second is address. I attempted to duplicate the two models on one form  
as seen in Advanced Rails Recipes and Railscasts, and they work fine -  
except when there are validation issues on the address piece it just  
returns saying “Addresses is invalid”. I would much rather it say  
“Street Address is blank” or “City cannot be blank” any ideas on how  
to do this?

2. In using the GeoKit plugin I am attempting to use the  
acts\_as\_mappable piece so when I create an address it adds the lat and  
lng to the DB. If I choose just 1 field and specify it this works fine  
and the table populates, but I want to concat all of the form values  
(Street\_Address\_1, City, State, Postal\_Code, Country) and pass these  
in as the location. It appears GeoKit expects address to be a single  
field - which will not work for my application. I am not opposed to  
using another plugin, it just seems GeoKit is overall the easiest.

Any help would be greatly apperciated, and please go easy on me, I am  
attempting to learn RoR on and old AWDWR book, and Advanced Rails  
Recipies.

---

<div class="post-metadata">

**Author:** ![Jeff.Corcoran](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/bc79bd/32.png) [@Jeff.Corcoran](https://www.ruby-forum.com/u/Jeff.Corcoran)\
**Post date:** [July 7, 2008, 4:27am UTC](https://www.ruby-forum.com/t/geokit-form-validation/142338/2 "2008-07-07T04:27:21Z")

</div>

I’m thinking that perhaps the answer to my second issue with GeoKit is  
simply needing to concatenate the fields for my address form into a  
string, however, no matter what I try I get errors. Any suggestions on  
how to do this?
