-
Notifications
You must be signed in to change notification settings - Fork 0
API documentation
Usage: Check if given input is actual email address.
True: email@someisp.com
, my_email@gmail.com
False: given@email@willfail.com
, incorrect##email@
public function isEmail($input)
Usage: Check if given input is actual URL.
True: https://example.com
, example.com
, http://example.com
False: htt://example.com
public function isUrl($input)
Usage: Check if given input is URL slug.
True: some-slug-123-slug
, some-slug-ok
False: given-slug_have-underscore
, this-slug -has-space
public function isSlug($input)
Usage: Check if given input is IP address v4.
True: 127.0.0.1
, 192.0.0.1
False: 127.0.P.1
, 0.0. 1.0
public function isIPv4($input)
Usage: Check if given input is IP address v6.
True: 2001:0db8:0a0b:12f0:0000:0000:0000:0001
False: 2XX1:0db8:0a0b:12f0:0000:0000:0000:0001
public function isIPv6($input)
Usage: Check if given input is HTML based string.
True: <p class="test">My P tag</p>
False: <p class="test"My P tag not closed</p>
public function isHtml($input)
Usage: Check if given input is hex color code.
True: #FFFFFF
False: #HFFFFF
*// got H
character
public function isHex($input)
Usage: Check if given input is zipcode.
True: 880000
False: 088000
public function isZipcode($input)
Usage: Check if given input is valid country code.
True: CRO // Croatia
False: ZCRO
public function isCountry($input)
Usage: Check if given input is valid integer number.
True: 1234
False: 12.3
public function isNumber($input)
Usage: Check if given input is valid float number.
True: 12.3
False: 1234
public function isFloat($input)
Usage: Check if given input is valid text.
True: This is some text
False: This is some text with number 5
public function isText($input)
Usage: Check if given input is valid date.
True: 10/03/1982
, 10-03-1982
, 10.03.1982
False: Any other date input format
public function isText($input)
$input = dd/mm/yyyy ; dd-mm-yyyy ; dd.mm.yyyy
Usage: Check if given input is valid credit card number.
True: Visa, Amex, Mastercard, and many more
False: Any given number that does not offer card type in PAN
public function isCreditCardNumber($input)