B
btmgreg
Guest
Hey all,
I've been trying to use the following template as a custom validator. The rest seem to be working fine, but I think this one is because the url has a hyphen inside like this -
https://www.linkedin.com/in/connor-hammond-5ba789137/
Code:
Read more
Continue reading...
I've been trying to use the following template as a custom validator. The rest seem to be working fine, but I think this one is because the url has a hyphen inside like this -
https://www.linkedin.com/in/connor-hammond-5ba789137/
Code:
Code:
<?php
namespace XF\Validator;
use function is_string;
class Linkedin extends AbstractValidator
{
public function isValid($value, &$errorKey = null)
{
if (!preg_match('/^[a-z0-9_]+$/i', $value))
{
$errorKey...
Read more
Continue reading...