all_validations_br 3.0.0 copy "all_validations_br: ^3.0.0" to clipboard
all_validations_br: ^3.0.0 copied to clipboard

String validations and remover char ex ('/', '-', '.'), more than a validation for your best projects. Made with love

All Validations BR

Descrição do Projeto #

  • AllValidations é uma solução extra leve e poderosa para Flutter. Combine validações para agilizar seu desenvolvimento. esperamos que ajude você com seus projetos.

⚙️ Funcionalidades #

  • [✅] isNull - [✅] isNum
  • [✅] isNumericOnly - [✅] isNumericFloat
  • [✅] isAlphabetOnly - [✅] isVideo
  • [✅] isImage - [✅] isURL
  • [✅] isEmail - [✅] isPhoneNumber
  • [✅] isDateTime - [✅] isMD5
  • [✅] isSHA1 - [✅] isSHA256
  • [✅] isSSN - [✅] isBinary
  • [✅] isIPv4 - [✅] isIPv6
  • [✅] isHexadecimal - [✅] isLowerThan
  • [✅] isGreaterThan - [✅] isCnpj
  • [✅] isCpf - [✅] isRG
  • [✅] isUUID - [✅] isJSON
  • [✅] isCreditCard - [✅] isLowercase
  • [✅] isUppercase - [✅] isInt
  • [✅] isEqual - [✅] isValidBRZip
  • [✅] isPDF - [✅] isTxt
  • [✅] isChm - [✅] isVector
  • [✅] isHTML - [✅] removeCaracteres
  • [✅] isMediumPassword - [✅] isStrongPassword
  • [✅] removeAccents - [✅] isPalindrome
  • [✅] isName - [✅] isMapExists

🧪 Contracts #

class TestParameters extends ValidationNotifiable {
  final String name;
  final String email;

  TestParameters({
    required this.name,
    required this.email,
  }) {
    addNotifications(Contract()
        .hasMinLen(name, 2, 'TestParameters.Name',
            "Nome deve ter no mínimo 2 caracteres!")
        .isEmail(email, "TestParameters.Email", "Email deve ser preenchido!"));
  }
}

main() {
      final testParameters =
          TestParameters(email: "exemplo@teste.com", name: "c");
      // print(testParameters.notifications.length);
     // 1;
      if(testParameters.isValid){
        print("Valido");
      }else{
        print("Invalido");
      }
      //print all erros
      testParameters.notifications.forEach((f) => print(f.message));
}
//this return false

🎲 exemplo de validação CPF

var isCpf = AllValidations.isCpf(000.000.000.00); 
//this return false

#### 🎲 exemplos de Remoção caracteres  
```dart
//(ex: `/`, `-`, `.`)
var remover = AllValidations.removeCharacters('000.000.000-00'); 
//this return 00000000000

🎲 exemplos de comparação de senha ou frases

//(ex: `/`, `-`, `.`)
var remover = AllValidations.isPhraseEqual('123456789', '123456789');
//this return true

🎲 exemplos de retorno de lista de dias da semana

//(ex: `/`, `-`, `.`)
var remover = AllValidationsGetWeek.listDaysWeekAbvr;
//this return ['Segunda','Terça','Quarta','Quinta','Sexta','Sábado','Domingo']

Você também pode retornar meses, regiões, estados tudo através do AllValidationsGet

🎲 exemplos de remoção acentos e caracters de um texto

//(ex: `/`, `-`, `.`)
var remover = AllValidations.removeAccents( 'áãé');
//this return aae

🎲 exemplos para check se um key existe e se seu valor e nullo ou vazio - map(json)

//(ex: `/`, `-`, `.`)
 Map map1 = {"status": "success", "message": "successfully logged out"};

    final sut =
        AllValidations.isMapExists(map: map1, key: ['status']);

    expect(sut, true);
//this return is log in your console

📝 Licença #

Este projeto esta sobe a licença MIT.

91
likes
130
pub points
81%
popularity

Publisher

unverified uploader

String validations and remover char ex ('/', '-', '.'), more than a validation for your best projects. Made with love

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (LICENSE)

Dependencies

flutter

More

Packages that depend on all_validations_br