FluxCP icon indicating copy to clipboard operation
FluxCP copied to clipboard

Lack of Input validation

Open cydh opened this issue 6 years ago • 4 comments

I don't see any built-in or easy-to-use or function for input validation in flux. What I found if there's input (POST or GET) passed by $this->params all you need to make self-validation.

How about https://github.com/Respect/Validation ?

As example,

  • CI has this https://www.codeigniter.com/userguide3/libraries/form_validation.html#setting-validation-rules
  • Laravel has this https://laravel.com/docs/5.6/validation#available-validation-rules
  • Yii Framework has this https://www.yiiframework.com/doc/guide/2.0/en/input-validation

Requirement

  • PHP 5.4+ ~~or HHVM 3.3+ are required.~~ (so README.md will be 5.3 to 5.4, I run this test on PHP 7.2 and in other localhost I have 5.4 so can't test for 5.3)

cydh avatar Jul 16 '18 08:07 cydh

+1

hurtsky avatar Jul 16 '18 08:07 hurtsky

Talk about respect/validation, it requires PHP 5.4 from its 1.1 version installed by composer. And it can used directly like this Flux with Respect Validation

cydh avatar Jul 19 '18 12:07 cydh

Seems like a very useful component to Flux.

aleos89 avatar Jul 19 '18 13:07 aleos89

and maybe a little workaround for Styling Error Message (<-- gist edited)

cydh avatar Jul 19 '18 13:07 cydh