Releases: Wixel/GUMP
Maintenance update
This release includes a fix for min_numeric validation rule.
Maintenance update
This release improves the url_exists validation rule and fixes a error messages problem.
Maintenance update
This release includes one new feature, two new translations, and few fixes.
- Use another field's value as parameter for a validation rule using underscore prefix + field name as parameter. Example:
$data = [
'min_characters' => 12,
'characters' => 'My string'
];
$rules = [
'min_characters' => 'required',
'characters' => 'required|min_len,_min_characters' // equals to: min_len,12
];
- Improved 'date' validation rule. Now you will be able to specify a custom date format. Example:
$data = [
'date' => '01-12-2017'
];
$rules = [
'date' => 'required|date,d-m-Y' // Spanish like format
];
Minor bugfixes release and small improvements
This release mainly contains the following changes:
- validate_boolean() now can accept values like 'yes', 'no' / 'on', 'off' / '1', '0' / 'true', 'false' from input forms.
- Russian translation for validation rules added.
- Issue #142 solved, which will help for a better extensibility of GUMP.
Feature and minor bugfixes release
This release includes one new method involved in the multilingual support task.
The method is set_error_message():
GUMP::set_error_message('validate_required', 'The {field} field can not be empty');
You can also use set_error_messages() for multiple custom error messages:
GUMP::set_error_messages([
'validate_required' => 'The {field} field can not be empty',
'validate_numeric' => 'The {field} field must be a number, {param} is not a number'
]);
Four new rules: valid_array_size_greater, valid_array_size_lesser, valid_array_size_equal (see PR #175) and alpha_numeric_space (see PR #172)
Maintenance update
This release contains user contributed updates and improvements. We're still working on getting the documentation cleaned up and re-written.
Feature and bugfix release
This release includes bugfixes and also brings multilingual support to GUMP.
To use multilingual support start translating the error messages to your language inside lang folder, and then specify the language key in GUMP's constructor.
Example to switch to another language:
$lang = 'en';
$gump = new GUMP($lang);
Example of setting your custom error message on add_validator:
$message = 'The {field} must be nice';
GUMP::add_validator("is_nice", function($field, $input, $param = NULL) {
return ($input[$field] == 'nice');
}, $message);
Maintenance update
This release contains user contributed patches and documentation improvements.
Maintenance update
A minor release to fix the higher priority issues that have been reported.
Bugfix Release
This release mostly contains bug fixes and performance improvements on v1.0