Download the PHP package wixel/gump without Composer

On this page you can find all versions of the php package wixel/gump. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?
wixel/gump
Rate from 1 - 5
Rated 5.00 based on 1 reviews

All versions of gump with dependencies

Informations about the package gump

Getting started

GUMP is a standalone PHP data validation and filtering class that makes validating any data easy and painless without the reliance on a framework. GUMP is open-source since 2013.

Supports wide range of PHP versions (php7.1 to php8.1) and ZERO dependencies!

Total Downloads Latest Stable Version Build Status Coverage Status License

Install with composer

Short format example for validations

Short format example for filtering

Long format example

:star: Available Validators

Important: If you use Pipe or Semicolon as parameter value, you must use array format.

| Rule | Description | |--------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | **required** | Ensures the specified key value exists and is not empty (not null, not empty string, not empty array). | | **contains**,one;two;use array format if one of the values contains semicolons | Verify that a value is contained within the pre-defined value set. | | **contains_list**,value1;value2 | Verify that a value is contained within the pre-defined value set. Error message will NOT show the list of possible values. | | **doesnt_contain_list**,value1;value2 | Verify that a value is contained within the pre-defined value set. Error message will NOT show the list of possible values. | | **boolean**,strict | Determine if the provided value is a valid boolean. Returns true for: yes/no, on/off, 1/0, true/false. In strict mode (optional) only true/false will be valid which you can combine with boolean filter. | | **valid_email** | Determine if the provided email has valid format. | | **max_len**,240 | Determine if the provided value length is less or equal to a specific value. | | **min_len**,4 | Determine if the provided value length is more or equal to a specific value. | | **exact_len**,5 | Determine if the provided value length matches a specific value. | | **between_len**,3;11 | Determine if the provided value length is between min and max values. | | **alpha** | Determine if the provided value contains only alpha characters. | | **alpha_numeric** | Determine if the provided value contains only alpha-numeric characters. | | **alpha_dash** | Determine if the provided value contains only alpha characters with dashed and underscores. | | **alpha_numeric_dash** | Determine if the provided value contains only alpha numeric characters with dashed and underscores. | | **alpha_numeric_space** | Determine if the provided value contains only alpha numeric characters with spaces. | | **alpha_space** | Determine if the provided value contains only alpha characters with spaces. | | **numeric** | Determine if the provided value is a valid number or numeric string. | | **integer** | Determine if the provided value is a valid integer. | | **float** | Determine if the provided value is a valid float. | | **valid_url** | Determine if the provided value is a valid URL. | | **url_exists** | Determine if a URL exists & is accessible. | | **valid_ip** | Determine if the provided value is a valid IP address. | | **valid_ipv4** | Determine if the provided value is a valid IPv4 address. | | **valid_ipv6** | Determine if the provided value is a valid IPv6 address. | | **valid_cc** | Determine if the input is a valid credit card number. | | **valid_name** | Determine if the input is a valid human name. | | **street_address** | Determine if the provided input is likely to be a street address using weak detection. | | **iban** | Determine if the provided value is a valid IBAN. | | **date**,d/m/Y | Determine if the provided input is a valid date (ISO 8601) or specify a custom format (optional). | | **min_age**,18 | Determine if the provided input meets age requirement (ISO 8601). Input should be a date (Y-m-d). | | **max_numeric**,50 | Determine if the provided numeric value is lower or equal to a specific value. | | **min_numeric**,1 | Determine if the provided numeric value is higher or equal to a specific value. | | **starts**,Z | Determine if the provided value starts with param. | | **required_file** | Determine if the file was successfully uploaded. | | **extension**,png;jpg;gif | Check the uploaded file for extension. Doesn't check mime-type yet. | | **equalsfield**,other_field_name | Determine if the provided field value equals current field value. | | **guidv4** | Determine if the provided field value is a valid GUID (v4) | | **phone_number** | Determine if the provided value is a valid phone number. | | **regex**,/test-[0-9]{3}/ | Custom regex validator. | | **valid_json_string** | Determine if the provided value is a valid JSON string. | | **valid_array_size_greater**,1 | Check if an input is an array and if the size is more or equal to a specific value. | | **valid_array_size_lesser**,1 | Check if an input is an array and if the size is less or equal to a specific value. | | **valid_array_size_equal**,1 | Check if an input is an array and if the size is equal to a specific value. |

:star: Available Filters

Filter rules can also be any PHP native function (e.g.: trim).

| Filter | Description | |------------------------|-----------------------------------------------------------------------------------------------------------------------| | **noise_words** | Replace noise words in a string (http://tax.cchgroup.com/help/Avoiding_noise_words_in_your_search.htm). | | **rmpunctuation** | Remove all known punctuation from a string. | | **urlencode** | Sanitize the string by urlencoding characters. | | **htmlencode** | Sanitize the string by converting HTML characters to their HTML entities. | | **sanitize_email** | Sanitize the string by removing illegal characters from emails. | | **sanitize_numbers** | Sanitize the string by removing illegal characters from numbers. | | **sanitize_floats** | Sanitize the string by removing illegal characters from float numbers. | | **sanitize_string** | Sanitize the string by removing any script tags. | | **boolean** | Converts ['1', 1, 'true', true, 'yes', 'on'] to true, anything else is false ('on' is useful for form checkboxes). | | **basic_tags** | Filter out all HTML tags except the defined basic tags. | | **whole_number** | Convert the provided numeric value to a whole number. | | **ms_word_characters** | Convert MS Word special characters to web safe characters. ([“ ”] => ", [‘ ’] => ', [–] => -, […] => ...) | | **lower_case** | Converts to lowercase. | | **upper_case** | Converts to uppercase. | | **slug** | Converts value to url-web-slugs. | | **trim** | Remove spaces from the beginning and end of strings (PHP). |

Other Available Methods

Creating your own validators and filters

Adding custom validators and filters is made easy by using callback functions.

Alternately, you can simply create your own class that extends GUMP. You only have to have in mind:

Global configuration

This configuration values allows you to change default rules delimiters (e.g.: required|contains,value1;value2 to required|contains:value1,value2).


Version
Requires php Version >=7.1
ext-mbstring Version *
ext-json Version *
ext-intl Version *
ext-bcmath Version *
ext-iconv Version *

The package wixel/gump contains the following files

Loading the files please wait ....