From bda2efd42e8896c03d6a95591a6d77bcb761ce26 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Fri, 6 Jan 2017 12:37:30 +0200 Subject: Add valid_mac() FV rule Close #3992 --- user_guide_src/source/changelog.rst | 1 + user_guide_src/source/libraries/form_validation.rst | 1 + 2 files changed, 2 insertions(+) (limited to 'user_guide_src') diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index a8467dcf1..e83ad41ad 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -45,6 +45,7 @@ Release Date: Not Released - Removed previously deprecated method ``prep_for_form()`` / rule *prep_for_form*. - Changed method ``set_rules()`` to throw a ``BadMethodCallException`` when its first parameter is not an array and the ``$rules`` one is unused. + - Added rule **valid_mac**, which replicates PHP's native ``filter_var()`` with ``FILTER_VALIDATE_MAC``. - :doc:`HTML Table Library ` changes include: diff --git a/user_guide_src/source/libraries/form_validation.rst b/user_guide_src/source/libraries/form_validation.rst index 915ce876f..65fd9acc8 100644 --- a/user_guide_src/source/libraries/form_validation.rst +++ b/user_guide_src/source/libraries/form_validation.rst @@ -987,6 +987,7 @@ Rule Parameter Description **valid_emails** No Returns FALSE if any value provided in a comma separated list is not a valid email. **valid_ip** No Returns FALSE if the supplied IP is not valid. Accepts an optional parameter of 'ipv4' or 'ipv6' to specify an IP format. +**valid_mac** No Returns FALSE if the supplied MAC address is not valid. **valid_base64** No Returns FALSE if the supplied string contains anything other than valid Base64 characters. ========================= ========== ============================================================================================= ======================= -- cgit v1.2.3-24-g4f1b