You are here

public function BrazilianIdsService::clean in Brazilian IDs 8

Cleans up Brazilian IDs numbers.

Overrides BrazilianIdsServiceInterface::clean

File

src/BrazilianIdsService.php, line 17

Class

BrazilianIdsService
Provides validation functionalities for Brazilian IDs numbers.

Namespace

Drupal\brazilian_ids

Code

public function clean($value) {
  return isset($value) ? str_replace([
    ' ',
    '.',
    '-',
    '/',
  ], '', $value) : NULL;
}