Category "validation"

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'

Conditional Data Validation on an Excel Sheet with NPOI

I'm trying to do an excel where to import some data with validations and I've never used npoi before (and my knowledge of excel is as user) so I'm kinda lost a

Form hidden field and required validation use

I have an HTML5/Bootstrap form with hidden fields: style="display: none" which i show/hide via jQuery: show() | hide() For field validation i use the attri

Cannot create property 'ignore_whitespace' on string ' '

const Validator = require("validator"); const isEmpty = require("../validation/is-empty"); module.exports = function validateRegisterInput(data) { let errors

Validate UserIdentityToken with Javascript

How do i use javascript to validate the token from Office.context.mailbox.getUserIdentityTokenAsync(). Are there any javascript libraries for this?

How to validate password and confirm password in react hook form? Is there any validate property and message in react hook form to show errors?

Actually, I try to validate the form and Stucked to validate the password and confirm the password.. is there any property in useForm to validate the password a

Yup returns always an error even if all fields are valid

Yup is returning always one error in the array even though all fields are valid. The validation is working fine, is checking each field and showing the errors c

ASP .NET CORE simple parameter validation

Is it possible to do some validation using attributes on simple parameters, like: [HttpGet("test/{type}")] public ActionResult GetSomeData([Range(0,2)]byte typ

How to reset custom validation errors when using editform in blazor razor page

I have an editform using an editcontext: <EditForm OnValidSubmit="HandleValidSubmit" EditContext="_editContext" Context="auth"> <DataAnnotat

Why should I set max_length when using Choices in a Django model?

In the official Django 2 tutorial I found this: from django.db import models class Student(models.Model): FRESHMAN = 'FR' SOPHOMORE = 'SO' JUNIOR

React Form hook - getting "required field" error message despite input being entered

I just started building a form using react form hook. Just started with single input called name and when I submit the form I get the error message. I tried to

How do I compare two dates in HTML? [duplicate]

This is my code: <input type="date" name="startDate" id="startDate" /> <input type="date" name="endDate" id="endDate" /> I want s

how to compare current date to a future date and validate it in javascript

` ` I have a date text field in mm/dd/yyyy format. When a date is entered, I'd like to validate it to make sure the date is 2 months greater than the c

Integer or String for a phone number?

I want to know if I have to use a string or an integer for a phone number? I have tried an integer but I have a problem in my validation. ... table->integ

Required fields are not working with ajax

I have created a Registration Form and set its input field to require attribute but its not working with ajax <div class="form-group"> <input requ

use bcrypt() in jquery or javascript

this code is written in validation.js to validate the all laravel change password forms dynamically $.validator.addMethod("matchp", function(value, elem