mirror of
https://github.com/a2nt/silverstripe-font-awesome.git
synced 2024-10-22 17:05:51 +02:00
FIX: icons validation
This commit is contained in:
parent
4635537a89
commit
aa37ff457c
@ -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.',
|
||||
|
Loading…
Reference in New Issue
Block a user