validation
Posted: 27 December 2010 08:12 PM   [ Ignore ]
Cleans up Nice!
RankRank
Total Posts:  261
Joined  2010-05-25

Hey Guys,

I was wondering if you could give a recommendation for an article or tutorial about how to validate against EE database? Its fairly easy for me to implement some jquery validation in the front end to check if fields have values etc, but I havent come accross a solution that actually checks against the EE channel settings or required fields etc.

Any ideas would be appreciated
Thanks
Florian

Profile
 
 
Posted: 27 December 2010 08:49 PM   [ Ignore ]   [ # 1 ]
Absolute Heartthrob!
Avatar
RankRankRankRankRank
Total Posts:  10369
Joined  2008-09-29

I’ve forwarded this to Rob. We’re on vacation this week though, so I don’t know if you’re going to get a response from him until after the 2nd of Jan.

I personally don’t know the answer to your question. Are you trying to make sure that a value IS or IS NOT in the database?

 Signature 
Profile
 
 
Posted: 27 December 2010 08:53 PM   [ Ignore ]   [ # 2 ]
Cleans up Nice!
RankRank
Total Posts:  261
Joined  2010-05-25

Hi chris,

No rush on this.

I am trying to validate anything that would otherwise trigger the EE default ‘error screen’ .. examples could be ‘username already exists’ or ‘these fields are required’ .. so, instead of having the user be send to that page, i’d rather validate that with jquery while they are filling out the form. that kind of thing.

Profile
 
 
Posted: 28 December 2010 09:32 PM   [ Ignore ]   [ # 3 ]
Teen Scream
Avatar
RankRankRank
Total Posts:  3541
Joined  2009-05-29

It would be time-consuming to write up a full example, but you can use SafeCracker’s form validation (http://barrettnewton.com/safecracker/user_guide/entry_form/#section_form_validation) combined with an AJAX form (http://barrettnewton.com/safecracker/user_guide/entry_form/#section_examples).

Profile
 
 
   
 
 
‹‹ Thanks for Rob      Force category entry ››