From 367d387890f490d679ee94a89629e359a8e4fd1d Mon Sep 17 00:00:00 2001 From: Obiechina Emmanuel <94564639+chibuike-19@users.noreply.github.com> Date: Fri, 9 Aug 2024 11:10:12 +0100 Subject: [PATCH] Added content to custom-validators topic (#6457) * Added content to custom-validators topic * Update src/data/roadmaps/angular/content/custom-validators@kxRtLsB3y_th8j-HjmJgK.md --------- Co-authored-by: dsh --- .../content/custom-validators@kxRtLsB3y_th8j-HjmJgK.md | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/data/roadmaps/angular/content/custom-validators@kxRtLsB3y_th8j-HjmJgK.md b/src/data/roadmaps/angular/content/custom-validators@kxRtLsB3y_th8j-HjmJgK.md index 949355038..5ea4147be 100644 --- a/src/data/roadmaps/angular/content/custom-validators@kxRtLsB3y_th8j-HjmJgK.md +++ b/src/data/roadmaps/angular/content/custom-validators@kxRtLsB3y_th8j-HjmJgK.md @@ -1 +1,8 @@ -# Custom Validators \ No newline at end of file +# Custom Validators + +Custom validators in Angular are functions that allow you to define your own validation logic for form controls. They are used when the built-in validators (like `required`, `minLength`, etc.) do not meet your specific validation requirements. A custom validator is a function that returns either `null` if the form control is valid, or an object that represents the validation error if it is invalid. This object typically contains a key-value pair where the key is the error name and the value is a boolean or some details about the error. + +Learn more from the following resources: + +-[@official@Defining custom validators](https://v17.angular.io/guide/form-validation#custom-validators) +-[@video@How to create custom validator in Angular 17](https://youtu.be/3TwmS0Gdg9I?si=1w4EX-HifJ70-CxT)