From aa37ff457cfc605042d89d937d2697d397d4858a Mon Sep 17 00:00:00 2001 From: Tony Air Date: Tue, 28 Jan 2020 20:50:15 +0700 Subject: [PATCH] FIX: icons validation --- code/formfields/FontAwesomeField.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/formfields/FontAwesomeField.php b/code/formfields/FontAwesomeField.php index 871959b..74b5e30 100644 --- a/code/formfields/FontAwesomeField.php +++ b/code/formfields/FontAwesomeField.php @@ -50,7 +50,7 @@ class FontAwesomeField extends TextField */ public function validate($validator) { - if (!empty($this->value) && !preg_match('/^fas fa-[a-z0-9]+/', $this->value)) { + if (!empty($this->value) && !preg_match('/^(fas|fa|far|fab) fa-[a-z0-9]+/', $this->value)) { $validator->validationError( $this->name, 'Please enter a valid Font Awesome font name format.',