mirror of
https://github.com/getgrav/grav.git
synced 2025-02-20 19:56:53 +01:00
Fixed blueprint field validation: Allow numeric inputs in text fields
This commit is contained in:
parent
b82c17ea56
commit
3ccadded97
|
|
@ -15,6 +15,7 @@
|
|||
* Fixed bug in `ContentBlock` serialization
|
||||
* Fixed `Route::withQueryParam()` to accept array values
|
||||
* Fixed typo in truncate function [#1943](https://github.com/getgrav/grav/issues/1943)
|
||||
* Fixed blueprint field validation: Allow numeric inputs in text fields
|
||||
|
||||
# v1.4.4
|
||||
## 05/11/2018
|
||||
|
|
|
|||
|
|
@ -128,10 +128,12 @@ class Validation
|
|||
*/
|
||||
public static function typeText($value, array $params, array $field)
|
||||
{
|
||||
if (!is_string($value)) {
|
||||
if (!is_string($value) && !is_numeric($value)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
$value = (string)$value;
|
||||
|
||||
if (isset($params['min']) && strlen($value) < $params['min']) {
|
||||
return false;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user