I would suggest some client-side validation for that. Maybe onChange run a method to strip bad characters from "this.value". Or, if you want a more full featured solution, you could look into TMT validation library. http://www.massimocorner.com/validator
On Mon, 2007-06-04 at 11:24 -0500, Green, Ms. Dawn wrote: > I have built an application that requires a user to register and log > in to the system. I use cflogin framework to log someone into the > system. > > > > The problem I have encountered is that some of the people are trying > to put a title in their name fields along with their names. For > example. FirstName = “Dawn” LastName = “Green, MSIS”. The problem is > with the LastName having the comma in it. It inserts into the > database just fine which is a varchar field, but when the person goes > to log into the system and goes to the forceUserLogin page, I have the > LastName as part of the <cfloginuser> to use as a session variable. > Here is what that code looks like. > > > > <cfloginuser > > NAME = "#getUser.userid#, #getUser.firstname#, #getUser.lastname#, > #getUser.email#, #getUser.UsersAccessID#, #getUser.PartnerID#" > > PASSWORD = "#form.userPassword#" > > roles = "#getUser.AccessLevel#"> > > > > What happens is that the comma in the LastName is being seen and it is > putting “Green” in the LastName field then seeing the comma and > putting the “MSIS” in the email field. > > > > I guess my question is… What can I do to prevent the user from putting > the comma in the cfinput field in the first place or is there some way > I can prevent it in the cfloginuser part of my code from reading the > comma in the database field? > > > > HELP! > > > > Thanks in advance for any help you can give me. > > > > Dawn Green > > > _______________________________________________ > Reply to DFWCFUG: > [email protected] > Subscribe/Unsubscribe: > http://lists1.safesecureweb.com/mailman/listinfo/list > List Archives: > http://www.mail-archive.com/list%40list.dfwcfug.org/ > http://www.mail-archive.com/list%40dfwcfug.org/ > DFWCFUG Sponsors: > www.instantspot.com/ > www.teksystems.com/ -- Aaron Lynch www.InstantSpot.com www.AaronJLynch.com --------------------------------------------------------------------- Get your free full-featured web site at www.InstantSpot.com InstantSpot is more than just blogging. It's your personal blog, your family's photo album, your connection to friends, your Spot on the web, your extra source of income! _______________________________________________ Reply to DFWCFUG: [email protected] Subscribe/Unsubscribe: http://lists1.safesecureweb.com/mailman/listinfo/list List Archives: http://www.mail-archive.com/list%40list.dfwcfug.org/ http://www.mail-archive.com/list%40dfwcfug.org/ DFWCFUG Sponsors: www.instantspot.com/ www.teksystems.com/
