Recommendations for php authentication system

I check the selection of fields in PHP, and I need to pre-prepare the base (line length, etc.) and more complex (strip <> tags, for example)

Can someone recommend a class that does this, or maybe a framework, or maybe some functions that do these things?

+4
source share
5 answers

I assume you are checking POSTED forms: use Zend_Form and Zend_Filter

+7
source

If you use PHP> = 5.2.0, you can use the PHP built-in filtering functions . In particular, look at filter_var_array , which you can use to validate an array of inputs, each with its own validation rules. If you do not want to buy them in full structure, they can be useful.

Alternatively, I found the Kohana validation library to be very good.

+2
source

Just look at the php validation class , it has over 60 validation methods in one php class.

+1
source

Respect / Validation

The most amazing validation engine created for PHP.

use Respect\Validation\Validator as v; $number = 123; v::numeric()->validate($number); // true 
+1
source

This is an ace: http://code.google.com/p/phpv/

Small, cool, easily extensible and more: I will develop it! :)

This context agnostic too, and can be used for validation in CLI scripts.

It also uses namespaces that are FINALLY added to the language. So there are more nominal clashes and all this sh * t.

Greetings

0
source

Source: https://habr.com/ru/post/1286070/


All Articles