Add numeric validator for float fields by default.

Make bake add numeric validator to float fields.

Fixes #2163
This commit is contained in:
mark_story 2013-10-20 22:54:30 -04:00
parent c08df2a7f9
commit bcafde6212

View file

@ -438,6 +438,8 @@ class ModelTask extends BakeTask {
$guess = $methods['notEmpty']; $guess = $methods['notEmpty'];
} elseif ($metaData['type'] === 'integer') { } elseif ($metaData['type'] === 'integer') {
$guess = $methods['numeric']; $guess = $methods['numeric'];
} elseif ($metaData['type'] === 'float') {
$guess = $methods['numeric'];
} elseif ($metaData['type'] === 'boolean') { } elseif ($metaData['type'] === 'boolean') {
$guess = $methods['boolean']; $guess = $methods['boolean'];
} elseif ($metaData['type'] === 'date') { } elseif ($metaData['type'] === 'date') {