The fact is that the project I'm developing is a database connection API
and, although is not essential, it would be nice that it could checks
the data integrity. The reason for do that is to improve the user (or
programmer :P) experience and prevent potential errors in the final
application,
Harold wrote:
Can you give an example of what you mean by validate the data before
passing it over to SQL?
If it's SQL injection you're worried about, rails can help clean up
user input, but I'm not sure that's where your heading with this...
On Feb 2, 11:18�am, Daniel L�pez
Harold A. Giménez Ch. wrote:
Sounds like something you can do with ActiveRecord validations:
http://api.rubyonrails.org/classes/ActiveRecord/Validations/ClassMethods.html
for example:
validates_numericality_of :some_numer
validates_length_of :something_else, :in = 3..12
You can use
I have an application that makes a render inline, and another in XML
based on data from an URL.
I need to validate the data before passing it over to SQL, and I would
like to receive the errors in the returned array, or at least a
TRUE/FALSE. As there is no associated view file I don’t know how
4 matches
Mail list logo