Security News
Fluent Assertions Faces Backlash After Abandoning Open Source Licensing
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
br-validator
Advanced tools
GainTime Br-validator é uma ferramenta para validação e máscara de CPF, CNPJ, telefones brasileiros, data e máscara de CEP com JavaScript puro..
npm install br-validator
import Br from 'br-validator'
// options é opcional, se vc não passar nada, será:
const options = {
css: true // Utilizar nosso stylesheet,
messages: true // Utilizar nossas mensagens de erro
}
const br = new Br(options)
const BR = br.init()
npm install br-validator@4.1.0-script
Será criada uma variável global chamada br
<script type="text/javascript" src="br-validator/dist/index.js"></script>
<script>
br.init() // Configuração padrão
// ou
new br.Br(options).init() // Assim você pode personalizar
</script>
Adicione o atributo data-validate aos inputs que deseja validar, tal que o valor do atributo pode ser cpf, cnpj, date, brPhone, cep, text ou num.
<input type="text" data-validate="cpf" />
Para validar ceps, utilizamos um formato diferente:
<script>
const BR = br.init()
BR.fields.cep.forEach((e) => {
e.addEventListener('blur', function (f) {
console.log(f)
br.cep(f.target, (response) => {
console.log(response)
})
})
})
</script>
FAQs
GainTime Br-validator é uma ferramenta para validação e máscara de CPF, CNPJ, telefones brasileiros, data e máscara de CEP com JavaScript puro..
We found that br-validator demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
Research
Security News
Socket researchers uncover the risks of a malicious Python package targeting Discord developers.
Security News
The UK is proposing a bold ban on ransomware payments by public entities to disrupt cybercrime, protect critical services, and lead global cybersecurity efforts.