Playing Next Lesson In
seconds

Let's Learn AdonisJS 6 #6.6

How To Create A Custom VineJS Validation Rule

In This Lesson

We'll learn how to make a custom validation rule with VineJS that requires a value to be unique for the provided table and column. We'll learn how we can register this rule for both strings and number types.

Created by
@tomgobich
Published

Join the Discussion 6 comments

Create a free account to join in on the discussion
  1. @redeemefy

    Good content so far. Thanks for putting it together. Keep up the hard work. This course indeed is going to help me start my own business. Praying to God to give me the strength to move forward with it.

    1
    1. Responding to redeemefy
      @tomgobich

      Thank you, redeemefy!! I'm happy to hear it's helping, and best of luck with starting your business! You got this, just take it one line at a time!! :D

      Also - apologies your Adocasts Plus badge was missing! Looks like it was a concurrency issue with the Stripe Webhook, I'll have to get that fixed up.

      0
      1. Responding to tomgobich
        @redeemefy

        Nice listening with those Stripe web-hooks. I use those myself at work when Stripe was our provider.

        1
        1. Responding to redeemefy
          @tomgobich

          Adocasts has been my first time working with Stripe, we do more direct B2B sales where I work, so it's been a fun learning experience lol. :D

          1
  2. @gribbl

    I believe there has been an update. Now, it is possible to use unique directly by providing an object with table and column properties. It's still good to know how to create a custom validation rule. :)

    1
    1. Responding to gribbl
      @tomgobich
      0