Fix for failing number validation on floats for some locales #2806

When validating a number with NumberValidator, it fails for non-string values, if a locale for LC_NUMERIC is set that doesn't use a dot as decimal separator.

See issue https://github.com/yiisoft/yii/issues/2806