Skip to content

Releases: Wixel/GUMP

Maintenance update

30 Jul 09:37
Compare
Choose a tag to compare

This release includes a fix for min_numeric validation rule.

Maintenance update

19 Jul 09:26
Compare
Choose a tag to compare

This release improves the url_exists validation rule and fixes a error messages problem.

Maintenance update

09 Jul 20:33
Compare
Choose a tag to compare

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
];
  • Portuguese (#190) and Hebrew (#185) error messages translations added.
  • Consistency between custom and built-in validators improved for validate() method #188.
  • Fix for 'validate_alpha_space' validation rule #187.
  • Error messages fix when multiple GUMP instances #180.
  • Array as input values support.

Minor bugfixes release and small improvements

18 Apr 14:22
Compare
Choose a tag to compare

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

22 Mar 10:48
Compare
Choose a tag to compare

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

05 Aug 23:00
@sn sn
Compare
Choose a tag to compare

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

21 Mar 22:05
Compare
Choose a tag to compare

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

29 Aug 10:33
Compare
Choose a tag to compare

This release contains user contributed patches and documentation improvements.

Maintenance update

06 Aug 07:16
@sn sn
Compare
Choose a tag to compare

A minor release to fix the higher priority issues that have been reported.

Bugfix Release

10 Jun 08:27
@sn sn
Compare
Choose a tag to compare

This release mostly contains bug fixes and performance improvements on v1.0