if (!preg_match('/^[a-zA-Z0-9]{6,12}$/', $username)) { $this->addError('username', 'username must be 6-12 chars & alphanumeric'); }
Pro tip: use ```triple backticks around text``` to write in code fences