Depends on what you're using to process/validate the
form.  

In javascript to validate/process on the client side
something like:

   var str = "  this is a test   ";

   str = str.replace(/^\s*|\s*$/g,"");


If you're passing it to validate/process on the server
side
in java

   str.trim()
or in simple-method

        <call-object-method method-name="trim"
obj-map-name="parameters" obj-field-name="str"
ret-field-name="newStr"/>

--- "J. Eckard" <[EMAIL PROTECTED]> wrote:

> What would be the best way to trim form input that
> is passed to stock 
> ofbiz services like "createPerson" and
> "createPostalAddress"? Add a new 
> <trim> operation to the simple-map-processors? Use
> an entity ECA? I'd 
> like to avoid creating people with names like "John 
> ", " Doe   ", etc. 
> and address lines like "Suite 200    ".
> 
> -Joe

Reply via email to