CustomHtmlForm\Validation\CheckFormData
Offers methods for form input validation.
- Author: Sebastian Diel <sdiel@pixeltricks.de>
- Copyright: 2017 pixeltricks GmbH
- License: see license file in modules root directory
Synopsis
class CheckFormData
{
- // members
- protected $value;
- // methods
- public void __construct()
- public array hasSpecialSigns()
- public array isEmailAddress()
- public array PtCaptchaInput()
- public array GoogleRecaptchaField()
- public array isFilledIn()
- public array( isFilledInDependantOn()
- public array( hasMinLength()
- public array( hasLength()
- public array( mustEqual()
- public array( mustNotEqual()
- public array( mustEqualDependantOn()
- public array( mustNotEqualDependantOn()
- public array( isValidDependantOn()
- public array( isNumbersOnly()
- public array( isDecimalNumber()
- public array( isCurrency()
- public array( isDate()
- private string getValueWithoutWhitespace()
- private boolean is_valid_email_address()
- private string email_strip_comments()
Members
protected
- $value
—
mixed
value of expression to be checked
Methods
private
- email_strip_comments() — Taken from "https://github.com/iamcal/rfc822".
- getValueWithoutWhitespace() — removes a values whitespaces and returns the value cleaned
- is_valid_email_address() — Taken from "https://github.com/iamcal/rfc822".
public
- __construct() — creates a new expression
- GoogleRecaptchaField() — checks reCAPTCHA field input
- PtCaptchaInput() — checks captcha field input
- hasLength() — Does the input string match the length defined? Whitespaces do not count
- hasMinLength() — Does the input strings have the minimum length? Whitespaces do not count
- hasSpecialSigns() — Checks if input containes special chars and if the result corresponds to the expected result
- isCurrency() — Checks if the field input is a currency
- isDate() — Checks if the field input is a date
- isDecimalNumber() — Does a field contain only characters for quantity specification?
- isEmailAddress() — Checks, whether the given string matches basicly an email address.
- isFilledIn() — Checks if a field is empty and if this result is expected
- isFilledInDependantOn() — Is the field empty? If a dependent field is not filled in an error will be returned
- isNumbersOnly() — Does a field contain number only
- isValidDependantOn() — Checks the validity of the field dependant of another field and a generic validation method.
- mustEqual() — Do the values of two fields match?
- mustEqualDependantOn() — Checks the equality of two fields dependant of another field.
- mustNotEqual() — checks if two field values do NOT match (inversion of mustEqual())
- mustNotEqualDependantOn() — Checks the equality of two fields dependant of another field.