[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [jfw] Validate, Filter, and Escape Package

On Friday, April 18, 2014 7:44:47 PM UTC-5, Andrew Eddie wrote:
On 18 April 2014 18:03, Amy Stephen <> wrote:
> If any of my code is useful it can be brought into the Joomla framework
> under the LGPL and changed. It will be treated like any other Joomla code --
> OSM's copyright -- your coding standards, your code. You can delete it -
> restructure it - keep it as it is. I'm still family. Like it, or not. ;-)

Ok, thanks for the offer. As I said, I'd prefer to separate Filtering
and Validation so I hope you won't be offended if when I get around to
making a PR, I do it in that fashion. I may, however, borrow some
ideas from your package if you don't mind.

I'd be lying if I said I wasn't offended. Anyone would be.

There are over 50 data type tests already available for validation, filtering, and escaping.

To use, a developer injects the $fieldhandler using the interface into the class during construction.

To Validate:

$result = $this->fieldhandler('Validate', 'Fieldname', $current_value, 'single, or, chain, of, tests');
if ($result->getReturnValue() === false) {
   $messages = $result->getErrorMessages();

To Filter:

$put_this_in_the_data = $this->fieldhandler('Filter', 'Fieldname', $current_value, 'single, or, chain, of, tests');

To Escape the output before rendering:

$ready_for_the_view = $this->fieldhandler('Escape', 'Fieldname', $current_value, 'html');

There are 158 tests -- all successful.

The usage is fully documented.

You didn't even test it or consider it -- nor did any of the framework team or members of the PLT -- or if they did, they didn't share any feedback.

I'm a developer -- a good one with 30+ years of experience -- and a member of this community.  Of course, I am offended. You have a prototype with five tests.

Just not one of the good 'ole boys.

Andrew Eddie

Framework source code: https://github.com/joomla/joomla-framework
Visit http://developer.joomla.org for more information about developing with Joomla!
You received this message because you are subscribed to the Google Groups "Joomla! Framework Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to joomla-dev-framework+unsubscribe AT googlegroups.com.
Visit this group at http://groups.google.com/group/joomla-dev-framework.