mirror of
https://github.com/getgrav/grav.git
synced 2026-08-31 05:16:15 +02:00
Merge pull request #397 from Sommerregen/patch-2
Addresses # 12 (form-plugin) Trim fields before validation
This commit is contained in:
@@ -588,6 +588,10 @@ class Validation
|
||||
|
||||
public static function validateRequired($value, $params)
|
||||
{
|
||||
if (is_string($value)) {
|
||||
$value = trim($value);
|
||||
}
|
||||
|
||||
return (bool) $params !== true || !empty($value);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user