FIX: icons validation

This commit is contained in:
Tony Air 2020-01-28 20:50:15 +07:00 committed by GitHub
parent 4635537a89
commit aa37ff457c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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.',