
Security News
Open Source CAI Framework Handles Pen Testing Tasks up to 3,600× Faster Than Humans
CAI is a new open source AI framework that automates penetration testing tasks like scanning and exploitation up to 3,600× faster than humans.
form-validate-angular
Advanced tools
When you give this ``Directive`` to a form element that is ill with ``NgForm``, it checks the validation rules of automatically linked elements and makes the class of those that fail the check ``is-invalid``. At the same time, if there is a div that gives
When you give this Directive
to a form element that is ill with NgForm
, it checks the validation rules of automatically linked elements and makes the class of those that fail the check is-invalid
. At the same time, if there is a div that gives a warning message, it automatically writes the validation error in it by default, if you want, you can write customized errors yourself.
import { FormValidateDirective } from 'form-validate-angular';
Component({
imports: [CommonModule, FormsModule, FormValidateDirective],
})
import { FormValidateDirective } from 'form-validate-angular';
@NgModule({
imports: [
CommonModule,
FormsModule,
FormValidateDirective
]
})
export class AppModule { }
<form formValidate #form="ngForm" autocomplete="off">
Auto Validation Message If you want validation messages to be assigned as automatic errors in the browser, you can set the autoValidate attribute to true
<form formValidate [autoValidateMessage]="true" #form="ngForm" autocomplete="off">
<form formValidate #form="ngForm" autocomplete="off">
<div class="form-group">
Email
<input class="form-control" name="email" ngModel required email type="email">
<div class="invalid-feedback">Email is required</div>
</div>
<div class="form-group">
Content
<textarea class="form-control" name="content" ngModel required minlength="5" cols="30" rows="10"></textarea>
<div class="invalid-feedback">Password is required</div>
</div>
<button class="btn btn-primary">Send</button>
</form>
Thanks to Serap for helping me with this library idea. :)
FAQs
When you give this ``Directive`` to a form element that is ill with ``NgForm``, it checks the validation rules of automatically linked elements and makes the class of those that fail the check ``is-invalid``. At the same time, if there is a div that gives
The npm package form-validate-angular receives a total of 12 weekly downloads. As such, form-validate-angular popularity was classified as not popular.
We found that form-validate-angular demonstrated a healthy version release cadence and project activity because the last version was released less than 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
CAI is a new open source AI framework that automates penetration testing tasks like scanning and exploitation up to 3,600× faster than humans.
Security News
Deno 2.4 brings back bundling, improves dependency updates and telemetry, and makes the runtime more practical for real-world JavaScript projects.
Security News
CVEForecast.org uses machine learning to project a record-breaking surge in vulnerability disclosures in 2025.