This forum is in READ-ONLY mode.
You can look around, but if you want to ask a new question, please use the new forum.
Home » support » symfony 1.3 and 1.4 » Validate get params
Validate get params [message #103195] Wed, 28 July 2010 15:31
Okin  is currently offline Okin
Messages: 4
Registered: July 2010
Junior Member
Hello !

I come from symfony 1.0 and there are some issues that i have to deal with...

The probably most important that I have is how to validate get params that I did validate with a YAML file.

Here is an explaination on what I want do do :

I am developing an API which will offer services such like account creation and login. Concerning the login action (api/login), I would like it to be called using a URL like mydomain.com/api/login.json?nickname=nick&password=pass.

However, the form validation in symfony 1.4 seems to have replaced every validation process that did exist in symfony 1.0. So I wonder how I can make sure the nickname exists in the database and how I can check if the nickname and password are provided by the user calling the API, knowing that all this requirements should not be checked in the action...

The solution I have found is to create a LoginForm with widgets and validators, even if it is used only to validate the url, but I am not sure it is the best pratice to do it.

Thanks !

[Updated on: Wed, 28 July 2010 19:41]

Previous Topic:CSRF attack detected
Next Topic:Git and release deployment
Goto Forum:
  

powered by FUDforum - copyright ©2001-2004 FUD Forum Bulletin Board Software