PHP Classes
elePHPant
Icontem

File: exemplo.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Renan Martins Pimentel  >  Validar dados  >  exemplo.php  >  Download  
File: exemplo.php
Role: Class source
Content type: text/plain
Description: Exemplo das funções
Class: Validar dados
Validate text values of several types
Author: By
Last change:
Date: 2 years ago
Size: 510 bytes
 

Contents

Class file image Download
<?php
header
('Content-type: text/html; charset=UTF-8');

include
"validacao.php";

$dados = new ValidarDados();

//Verificar email
echo $dados->verificarEmail("email@email.com");
echo
"<br />";

//Apenas número
echo $dados->apenasNumeros("ABC12345defg1183271239");
echo
"<br />";

//Converter data SQL para PT-BR
echo $dados->converterDataSql("9999-99-99 99:99:99");
echo
"<br />";

//Validar CPF
echo $dados->Cpf("999.999.999-99");
echo
"<br />";

//Validar CNPJ
echo $dados->Cnpj("99.999.999/9999-99");
?>