Thanks to visit codestin.com
Credit goes to github.com

Skip to content
This repository was archived by the owner on Jan 8, 2020. It is now read-only.
This repository was archived by the owner on Jan 8, 2020. It is now read-only.

Zend\I18n\Validator\Float does not set error message on NOT_FLOAT. #6647

@arkasai

Description

@arkasai

The float validator does not set a error message if value is not a float.
Method "isValid(...)" does only set a error if the value is INVALID. For NOT_FLOAT status the method "$this->error(...)" will not be called. If validator will be used for checking a value the validator will return "false" for none float values but the error message is empty.

Problem could be fixed if you add "$this->error(self::NOT_FLOAT);" before "return false;" on "isValid(...)" method.

Metadata

Metadata

Assignees

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions