Bug #3130

ValidatorResolver does not work for float/numeric/mixed typed method arguments

Added by Bastian Waidelich over 12 years ago. Updated about 11 years ago.

Status:
Resolved
Priority:
Should have
Category:
Validation
Start date:
2009-04-18
Due date:
% Done:

0%

Estimated time:
PHP Version:
Has patch:
Complexity:

Description

While implementing view helpers for Fluid I'm struggling with validation of the view helper arguments:

/**
 * @param float $value The value to format
 */
public function render($value) {
}

leads to the exception:

No validator found for argument name "value" with type "float"

The same for @param numeric and probably some more.

Additionally, we should be able to skip the "XSS-Filter" in some cases..:

<f3:form.textarea value="Some 'Test'" />

leads to the exception:

Validation for argument name "value" in view helper "F3\Fluid\ViewHelpers\Form\TextareaViewHelper" FAILED. Expected type: "string"; Given: "string".

internally, the error message is

The given subject was not a valid text (contained XML tags). Got: "Some 'Test'" 

Maybe

@param mixed

should be possible to allow to skip validation (Raw)..


Files

FLOW3_Validation_3130_01.patch (509 Bytes) FLOW3_Validation_3130_01.patch Bastian Waidelich, 2009-04-18 17:45
#2

Updated by Bastian Waidelich over 12 years ago

  • Assignee deleted (Andreas Förthner)
#3

Updated by Bastian Waidelich over 12 years ago

  • Status changed from New to Needs Feedback

If committed a fix for this in r2171. This needs verification as I don't have an overview of all implications. ValidatorResolver probably needs some rework, but that might go into new tickets.

#4

Updated by Robert Lemke over 12 years ago

  • Target version set to 283
#5

Updated by Bastian Waidelich over 12 years ago

  • Status changed from Needs Feedback to Resolved
  • Assignee set to Bastian Waidelich
  • Target version changed from 283 to 1.0 alpha 1

I close this issue as a solution was introduced already in r2171. ValidationResolver probably needs some rework, but that should go into new tickets.

Also available in: Atom PDF