Version: v0.7.0 - Beta.  We welcome contributors & feedback.$fieldName, $ruleset = 'id') -> any


Get an input field value sent via HTTP POST (usually via a form or Ajax request).

It will be validated per the given $ruleset. (See Input Validation)

If it does not pass validation, a default value will be returned for its type.

// POST: name=Tal+Thorson&age=33'name', 's')
//= 'Tal Thorson''age', 'i|max: 130')
//= 33'favoriteColor', 's')
//= ''  (default)'heightCm', 'i')
//= 0  (default)

See Also