Strict model: Trim values on set
New field property:
[
'field' => [
'trim' => {true|string}
]
]
This property will take two type of value:
- boolean - TRUE will do a standard
trim($value)
. - string - Will perform a string-based trim
trim($value, $string)
.
See: https://www.php.net/manual/en/function.trim.php for details on how PHP trim works.