---
title: "Discussion on \"How to Create a Custom Validator in AdonisJS\" | Hashnode"
description: "Discussion on \"How to Create a Custom Validator in AdonisJS\". In this blog post, I will show you how to create a custom validator in AdonisJS. We will use a sample rule that checks for the maximum length of a number."
url: "https://hashnode.com/posts/custom-validator-in-adonisjs/64b581010ae1ece5197243d6"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [How to Create a Custom Validator in AdonisJS](https://blog.ghanshyamdigital.com/custom-validator-in-adonisjs?utm_source=hashnode&utm_medium=feed)

In this blog post, I will show you how to create a custom validator in AdonisJS. We will use a sample rule that checks for the maximum length of a number.

Jul 17, 2023 · 2 min read · blog.ghanshyamdigital.com  
Updated Aug 22, 2023  
Read the article

-   [#adonisjs](https://hashnode.com/tag/adonisjs)
-   [#validation](https://hashnode.com/tag/validation)
-   [#data-validation](https://hashnode.com/tag/data-validation)
-   [#form-validation](https://hashnode.com/tag/form-validation)

## Written by

[Ghanshyam Digital](https://hashnode.com/@ghanshyamdigital)

@ghanshyamdigital · Surat, Gujarat

  
[View profile](https://hashnode.com/@ghanshyamdigital)

A Software Company

A company founded back in 2019 by two visionary Engineers to create and provide you with the best results possible. We are a web developing company with great vision and plans for the future to be a part of others success. We understand that you have deadlines and reputation to keep... so we will meet ours! You can rely on Ghanshyam Digital To handle your job expertly every time.

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
