
Security News
PodRocket Podcast: Inside the Recent npm Supply Chain Attacks
Socket CEO Feross Aboukhadijeh discusses the recent npm supply chain attacks on PodRocket, covering novel attack vectors and how developers can protect themselves.
@fikani/br-validations
Advanced tools
To install this library, run:
$ npm install @fikani/br-validations --save
From your Angular AppModule
:
import { BrowserModule } from "@angular/platform-browser";
import { NgModule } from "@angular/core";
import { FormsModule } from "@angular/forms";
import { AppComponent } from "./app.component";
import { CpfModule } from "@fikani/br-validations";
@NgModule({
declarations: [AppComponent],
imports: [
BrowserModule,
FormsModule,
//import here
CpfModule
],
bootstrap: [AppComponent]
})
export class AppModule {}
Once the library is imported, you can use its directives in your Angular application:
<!-- You can now use your library component in app.component.html -->
<input type="text" placeholder="CPF" cpf #cpfInput="ngModel" name="cpf" [(ngModel)]="cpf" />
{{cpfInput.valid}}
{{cpfInput.errors | json}}
You should use the CpfDirective
[cpf].
111.111.111-11
, it is read the same way as 111 111 111 11
and 11111111111
.example :
<input type="text" placeholder="CPF" cpf #cpfInput="ngModel" name="cpf" [(ngModel)]="cpf" />
{{cpfInput.valid}} // true or false
{{cpfInput.errors | json}} //null or { "cpf": false } if it has error
MIT © Afif Fikani
FAQs
## Installation
We found that @fikani/br-validations 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
Socket CEO Feross Aboukhadijeh discusses the recent npm supply chain attacks on PodRocket, covering novel attack vectors and how developers can protect themselves.
Security News
Maintainers back GitHub’s npm security overhaul but raise concerns about CI/CD workflows, enterprise support, and token management.
Product
Socket Firewall is a free tool that blocks malicious packages at install time, giving developers proactive protection against rising supply chain attacks.