Questions tagged [validation]
Validation is used to check data to make sure it fits whatever required specifications are set for it. Typically Validation is used in checking input data, and in verifying data before storage.
62,364
questions
0
votes
0answers
12 views
How to translate custom values for all indexes of array based form input fields for validation in Laravel
Take this array based form input fields that allows user to add and remove items with type (simple or complex) and complex infos:
<div class="item">
<div>
<h2>...
0
votes
0answers
8 views
TSeD Mixed type Enum and Collection
I am using TSeD version 6.38.1
I have the following model.
import {Any, CollectionOf, Enum, Property} from "@tsed/schema";
export enum Status {
status1,
status2,
...
}
export class ...
1
vote
2answers
24 views
How do I create a pop-up message when a date is greater than or equal to another date?
I have a form that has the current date (C3) and the date that the form was last updated (C7). I need a pop-up message to appear when someone tries to edit the form and it is outdated. Outdated being ...
0
votes
1answer
12 views
Ruby on Rails - Problem with nested_attributes validation when allow_destroy: true
I have some model with accepts_nested_attributes_for
class SomeModel < ApplicationRecord
has_many :some_resources
accepts_nested_attributes_for :some_resources, allow_destroy: true
......
0
votes
0answers
21 views
How to handle/catch a framework specific exception in Spring WebFlux
I have a Spring WebFlux app whee I'm using @JsonTypeInfo annotation to handle polymorphic types.
In the same time I'm using ConstraintValidator for the same key which is responsible for polymorphic ...
-1
votes
0answers
18 views
Validation checks for data contained in flat file using Node.js/Javascript
I receive data in a flat file (fixed size record). Each record can be mapped to various variables using data dictionary that is available.
I need to write validation checks that checks for range of ...
0
votes
2answers
22 views
How to make a code that detects repeating digits in a number python?
I want a simple code that can detect if number contains a repeated digit or not.
In python
without counter method.
For example,
if I enter 1234555
it sends a message that tells me invalid input
def ...
0
votes
0answers
7 views
How to make nested schema's field required in yup
I have a schema of dateTime:
export const dateTimeSchema = yup.object({
type: yup.string().default("datetime"),
value: yup.string().nullable().matches(/\d{4}-[01]\d-[0-3]\dT[0-2]\d:[...
0
votes
0answers
16 views
Manually call javax validation fails
i learning validaton on javax and i dont understand why my code not work.
i try to validate with Validator and it always pass and i should not.
Validator validator = Validation....
0
votes
1answer
13 views
Validation closure not firing?
I want to create a custom validation using closures in Laravel 5.6 as explained in the docs:
https://laravel.com/docs/5.6/validation#using-closures
That is my code:
public function store(Request $...
0
votes
1answer
7 views
React Native Input onEndEditing weird callback
So I try to build a form validation with React Native and the onEndEditing.
So my React Native code looks like this:
<TextInput onSubmitEditing={value => console.log(value)} />
When the user ...
0
votes
0answers
9 views
Strange Excel Validator behavior
I meet strange Excel validator behavoir.
My goal is to forbid user to enter some special symbols like '*'.
so i found a solution based on ROW and INDIRECT.
then when i`m trying to test - it woks only ...
0
votes
1answer
11 views
Ant Design- Form validation only when click outside a field
I have an email field in a form and it validates whether it's a valid email after each value change (e.g. it shows an error "email is not a valid email" as you keep typing).
How can we ...
0
votes
0answers
14 views
Laravel 8 Socialite check login
is there a way to check if the user has logged in with a Socialite?
because i want to create a post based on this authentication.
what i have done
if (!empty(Socialite::driver('linkedin')->...
0
votes
1answer
14 views
Rails custom model validator depending on check_box value
Lets say i have a model "Blog" with :title and :body.
Lets also say that in my view I have input for title, body and a check_box_tag that looks like this
<%= check_box_tag "published&...
1
vote
1answer
14 views
Cypress: How to test HTML5 built in validation popup?
How can we catch an HTML5 built in popup validation error when testing an App with Cypress? It does not seem to be showing up in the DOM so I have no clue about how to catch it with a cy command (I'm ...
-1
votes
1answer
25 views
How to throw exception collectively
Let's say we have a list of some ID's on which we need to perform some check and if check fails we are throwing an exception. This is pretty trivial what I want to do is check the whole list and throw ...
0
votes
1answer
22 views
How to execute the submit of a form from the click event of a common button?
I have the following code:
// HTML
<form #form="ngForm" [formGroup]='consumptionForm' (ngSubmit)="save()">
<label class="txt-label">consumption<...
0
votes
0answers
11 views
yup schema validation - tuples and alternative objects
In yup's doc I could not find anything for validating tuple arrays and alternative objects. How would an object like this be validated in yup?
interface Example {
tuple: string[]; // always two ...
0
votes
0answers
19 views
Form Field type select is not highlighting even it is required
return {
name: 'addressForm',
fields: [
{
name: 'Please enter your address here:',
type: 'regular',
elements: [
{
...
0
votes
0answers
22 views
laravel validation: unique two fields and array
Using laravel validation, I would like to ensure that a field is unique, but in an array context. (I have seen this and this but they don't address the array context.)
Let's suppose I have this html:
&...
1
vote
1answer
16 views
Conditional jQuery validation based on custom attribute
I'd like to enable/disable buttons on key up change conditionally based on a custom data attribute that matches between an input and a button. I've solved it with just one input, but it seems that ...
1
vote
1answer
44 views
Format check on date of birth in Python
I am currently developing a database application, where the user fills out a customer form and the data is added to a SQLite3 table. I am trying to add validation to my code, and I have it working, ...
-1
votes
0answers
7 views
can we put second arguments into the allowregex keyword argument [duplicate]
can we put second arguments such as ignorecase, dotall and verbose into the allowregex keyword argument in a pyinputplus function?
for example:
import pyinputplus, re
capOptional = r"SpOnGe"
...
0
votes
0answers
19 views
Can I validate a password before encryption in Springboot?
I made a SpringBoot application and now I'm at the login part.
I've made some custom restrictions with a custom annotation.
The problem is that this custom annotation is applied to the user after the ...
0
votes
3answers
48 views
Fluent Validation C# Unique Id in collection
I have an entity that has a nested collection as a property which I will receive from a front-end application.
I just want to make sure that each item in this collection(ICollection ...
-2
votes
1answer
52 views
Add Cells of Data to a sheet based on what's selected in a specified row
So far The sheet can be seen in it's working form here https://docs.google.com/spreadsheets/d/1HJ8PZ-zwsYDznvLleIozhg88K70ySXz0rF4fiU9uN4E/edit#gid=461565895
and an image here:
sheet visual
the idea ...
0
votes
0answers
18 views
validate nested content of json schema
I’m creating a schema consists of multiple categories. In each category there’s an array of key:value pairs. Each key represents the display name of value. Each value is unique and can only be ...
0
votes
0answers
20 views
How to verify an integer and prompt user if they enter a non-integer
Here is my code snippet:
while( menuChoice != 5 )
{
printMenu();
if( scanf( "%d", &menuChoice ) == 1 )
{
switch( menuChoice )
{
case 1:
...
1
vote
0answers
19 views
jqBootstrapValidation.js attr, translate data-validation-required-message from json file
Hi there i'm translating my website in 4 languages, i've done everything ok but now i'm stuck on contact form working with jqBootstrapValidation.js.
This is how the input field are first of my ...
0
votes
0answers
10 views
Find missing dates for each pair of main columns in spark dataframe [closed]
I want to find missing dates for each pair of main columns. I want to groupby elements of spark dataframe based on main columns (ID and COLOR) and then for each pair to get list of missing dates.
for ...
0
votes
1answer
29 views
Error in ValidationRule method after updating ReactiveUI.Validation up to 2.1.1 version
I updated my ReactiveUI.Validation package from version 1.5 and now it's <package id="ReactiveUI.Validation" version="2.1.1" targetFramework="net472" />. But after ...
0
votes
1answer
19 views
Angular reactive form with custom form-level validator AND updateOn 'blur' option doesn't works
I have problems combining :
angular reactive form
custom validator at form-level (cross-field validator)
usage of the 'updateOn' option set to 'blur'
I made a simple stackblitz to show the problem :
...
1
vote
0answers
27 views
DoubleValidator accepts 17.12 with Germany locale
I have this code:
Double result = org.apache.commons.validator.routines.DoubleValidator.getInstance().validate(stringNumber, locale);
If stringNumber is "17.12" and locale is Locale.GERMANY ...
0
votes
1answer
16 views
PPS Number Validation iOS Swift
PPS number majorly used in Ireland. Its validation contains more calculation. How can we validate the PPS number in swift code?.
1
vote
2answers
30 views
WooCommerce custom checkout checkboxes fields validation for one mandatory checkbox
I have three custom checkout fields, and people have to check at least one for the order to go through.
This is only needed for 1 product.
So, I loop through the cart items to check if the product is ...
0
votes
0answers
8 views
How to display text in an Excel drop-down menu, if the contents are based on hidden values. (Possible glitch that recently started occurring)
Okay, I've run into a problem which I know for a fact is possible, as I've created datasheets for work using this method. Say I set Column AA1 to AA14 to part numbers 1 to 14. I then use Data ...
1
vote
1answer
26 views
ng-pattern for PCRE
I have this pattern for an input text field: /[\p{L}\'.\- ]{3,30}/ My intention is to accept the most broadly names of people on several alphabets of the world (Latin, cirilicm chinese, etc.) It was ...
0
votes
0answers
17 views
Python KeyError: 1
I'm using pytorch to train UNet on 3D segmentation. In my kickstart script, I tried to create3 keys from my data and name them: "train", "val", "test". I'm getting an ...
0
votes
0answers
13 views
Json scheme unique key validation
I am writing a game and it has its configuration json file, which needs to be validated.
I am using json-scheme to validate the file.
This game is a Match3Game and there are 5 colors of gems. ['red','...
0
votes
1answer
24 views
laravel 7 profile udpate wiith email unique:users
I am trying to update the user profile. Everything works good but when i try to update name without updating the email. It gives an error saying the email already exists.
I have tried the method in ...
-2
votes
0answers
21 views
symfony AtLeastOneOf constraint does not add nested erros from underiuing collections
For examaple I have a array like this (really it's much bigger with more nesting levels)
[
'id' => 1,
'sub_elements' => [
[
'id' => 1,
'name' => 'some ...
0
votes
0answers
13 views
VBA IE Automation form on submitting going false, form not validating data
Need your help on below code on submitting form not capturing data, seems going false or data not validating, any suggestion/advise
Sub Register()
Dim appIE As InternetExplorerMedium
Dim objElement As ...
0
votes
0answers
13 views
Checking accuracy for multi output regression technique
I am looking for different methods to check accuracy for multi output regression model or validation. Here, the problem I am facing is I have more than one output variable say y(as y1, y2, y3) and ...
-3
votes
1answer
40 views
REGEX specific word from Name [closed]
I am trying to figure out regex for wrongly formated names where the user has entered in the name and the relationship as one value, for example
[Son of Joseph Joestar ] => s/o. Joseph Joestar
the ...
0
votes
0answers
5 views
At what point the validators are called in Django
class TestProduct(models.Model):
title = models.CharField(max_length=20, unique=True)
price = models.DecimalField(max_digits=4, decimal_places=2)
class TestProductForm(forms.ModelForm):
...
0
votes
0answers
17 views
Validate column names and types of data in spark dataframe
I want to read .csv file using pyspark in python, but I want to give just type for each column and use header(from .csv file) for column names(not names in schema). Does anybody know how to do that?
0
votes
1answer
16 views
Appian field validation erases field value
I have an appian form with fields which should accept only numbers.
There is a submit button and a cancel button.
However, i cannot make the buttons restore original values on failed validations.
When ...
-2
votes
0answers
43 views
Validate username? [closed]
Beginner here, I'm trying to figure out how to validate a username to satisfy these conditions...
Usernames cannot contain an ampersand (&), equals sign (=), underscore (_), apostrophe ('), dash (...
0
votes
1answer
28 views
Best way to validate an s3 object
As part of some debugging work, I was wondering how to best ensure that an given S3 object
complies to its class definition?
For example, running t.test returns an S3 htest object:
fit <- t.test(1:...