Category "validation"

How to format and validate email node js

I would like that email had format like: [email protected]. Which is the best way to do it? I have a component for registration and I have the field like this: <mat-f

Open A New Page After Form Validation JavaScript

I want to open a new page after i validated my form.There is no problem with validating it .But my form never submits ,and the html page i want to redirect to m

Laravel display validation error

I try use this code: @foreach($errors->all() as $error) <li>{!! $error !!}</li> @endforeac

Laravel unique validation on multiple columns

I have 2 columns in table servers. I have columns ip and hostname. I have validation: 'data.ip' => ['required', 'unique:servers,ip,'.$this->id] This

How to use yup validation on dynamic form using react-hook-form with useFieldArray

I'm trying to create a dynamic form using react-hook-form's useFieldArray hook. The user should be able to add or remove fields, thus making it dynamic. I've lo

Extracting a type and constraint from a Joi schema

If I have a schema: const schema = Joi.object({ title: Joi.string().trim().alphanum().min(3).max(50).required().messages({ "string.base": `Must be t

is there any way to validate a field that sometime is File(image) && sometime is String(Src of same image)

my problem : i am using laravel framework php i want validate a field witch my field sometime is File(image) and sometime is String(src of same image) is there

Try...catch not working as expected in Google Apps Script

[Edited to include a minimal reproducible example as suggested by T.J. Crowder.] I'm working on a simple function using Google Apps Script that is supposed to

JSON error: " Expecting 'STRING', '}', got 'undefined'"

EDIT: I changed the single-quotes to double-quotes and the linters don't complain. I put this into jsonlint.com and I got this error: Error: Parse error on line

My custom validation annotation is not working in Spring Boot

i have created an annotation that has features such as checking if the entered string is null or at the assigned value.But the annotation doesn't work. I don't

How to use "invalid-feedback" class with selectpicker from Bootstrap-Select?

I'm using Bootstrap to do some form validation on my web app. With a normal select menu, it would be really easy to have an error message pop-up when the field

Laravel Form Request custom error message for date_format rule

I want to add a custom message on date_format validation in laravel but conldn't find any thing.How i can add a custom message I have used this $messages = [ 'p

Invalid signature while validating Azure ad access token, but id token works

I am getting invalid signature while using jwt.io to validate my azure ad access token. My id token, however, validates just fine! I have seen and tried the so

Joi - make everything required by default?

I'm building out a Node/Express API and using Joi for validation. It's a great package and has been incredibly useful. However, we're getting tired of doing thi

Joi - make everything required by default?

I'm building out a Node/Express API and using Joi for validation. It's a great package and has been incredibly useful. However, we're getting tired of doing thi

Spring Data MongoDb - how to use "findAll" method which return only valid documents

I use Spring data mongo as ORM for accessing to my MongoDb. I need to read a MongoDb collection containing documents that I don't manage content and its validit

How to get the value of an invalid HTML date input?

I am building a calendar picker to accompany (and replace the default calendar date picker provided by some browsers) an input of type="date". It is documented

How can i get specific error messages from a Mongoose Schema?

I am trying to set up user validation in Mongoose and struggling to get the specific messages to appear. Here is my model const userSchema = new Schema({ n

Laravel validation only allow one value for each field

I currently have a validation for sortField but I checked this accepts /api/request?sortField='date'&sortField='time' and I want it to only accept one value

TextFormField validator not working - The method 'validate' was called on null

I am trying to build a simple login page for a new flutter app. The widget tree is very basic. It consists of a MaterialApp that contains a Scaffold. The 'home'