67,750 questions
0
votes
0
answers
70
views
survcheck: 'x' must be an array of at least two dimensions
I cannot seem to validate my data for survival analysis using the survival package.
It used to work.
Here is a MWE:
library(survival)
paper_test <- structure(
list(
time1 = c(0, 127),
...
0
votes
0
answers
45
views
Pointblank row_count_range in Pointblank instead of row_count_match
I am using the python package pointblank.
There is a function row_count_match() that can check that a dataframe matches the expected number of rows.
(
pb.Validate(data=pb.load_dataset(dataset=&...
0
votes
0
answers
50
views
Grails 3.3.10 to 4.0.4 validation problem
I have an old project in grails 3.3.10 and try to migrate to 4.0.4 (step by step, finally to 7)
I have problem with cmds
Caused by: groovy.lang.MissingMethodException: No signature of method: xxx....
0
votes
0
answers
46
views
How to intercept/modify keystrokes before the Microsoft Chinese IME processes them on Windows?
I’m using Microsoft IME (Chinese Simplified) and I need to type a backslash (\) while Chinese mode is active.
However, when I press the backslash key, the IME always converts it into the Chinese ...
0
votes
3
answers
94
views
Validating Hidden Field
In my ASP.NET Core application, I have a signature pad with JavaScript that copies the signature data to a hidden field. That hidden field, which represents the signature, is required.
The problem is ...
Advice
1
vote
3
replies
65
views
When are basic types such as `factor` validated in R?
I'm a bit confused about an example from Advanced R, 13.3.2 Validators.
The write a constructor for factors
new_factor <- function(x = integer(), levels = character()) {
stopifnot(is.integer(x))
...
Best practices
0
votes
7
replies
169
views
What is the Pythonic way to handle invalid user input in a while loop?
import random
number_to_guess = random.randint(1, 10)
while True:
guess = input("Guess a number between 1 and 10: ")
# This crashes if 'guess' is not a number
if int(guess) == ...
-1
votes
0
answers
380
views
Implementing Incremental Data Quality Validation in Large-Scale ETL Pipelines with Schema Evolution
I'm working on a large-scale ETL pipeline processing ~500GB daily across multiple data sources. We're currently using Great Expectations for data quality validation, but facing performance bottlenecks ...
Tooling
0
votes
4
replies
115
views
Schematron validation for Peppol invoices?
The Peppol Invoce and/or Credit note will be generated from the ERP.
I am aware of steps of validation, and I have successfully used the on-line validator (https://peppol-tools.ademico-software.com/ui/...
2
votes
1
answer
151
views
Trying to learn how getchar works
I am encountering a problem inside a while loop that is embedded in a for loop iterating through a struct of arrays. The issues I am coming across is before the array iterates again, I want to have ...
0
votes
1
answer
86
views
Why are my data quality validation rules not triggering for null values in my dataset?
I’m working on a data quality workflow where I validate incoming records for null or missing values.
Even when a column clearly contains nulls, my rule doesn’t trigger and the record passes validation....
Advice
0
votes
0
replies
42
views
Designing a props-driven test framework for data quality validation - best patterns?
Question: I'm building a testing system for a data quality SaaS app where tests are entirely props-driven (similar to React component testing philosophy).
Goal: Create reusable, composable test ...
0
votes
0
answers
48
views
How to handle API responses with null values while maintaining strict input validation in TypeScript/Moleculer?
I'm building a microservice with Moleculer.js and TypeScript, using Zod v4 for schema validation. I need to validate API responses that return null for optional fields, while keeping strict validation ...
0
votes
1
answer
102
views
Keycloak: how to connect custom validator?
Hello I have a project in which I need to validate some code if chosen role is Scientist. I have written my validator (current validation logic is irrelevant)
package com.example.keycloak;
import org....
Tooling
0
votes
0
replies
95
views
Machine learning to manage Excel files
I would like to train a model to understand if an Excel file has the expected structure. I can put a list of right files in a folder and a list of wrong ones in another. Any help and suggestion are ...
1
vote
0
answers
53
views
Issue with Instantiating CsvValidator.ValidatorBuilder Due to Package-Private Access in csv-validator-java-api
I've been working with the csv-validator-java-api and came across a potential discrepancy in its documentation (or maybe I misunderstood how to use it). According to the documentation, the inner ...
0
votes
0
answers
56
views
How to automatically convert FormData types in Next.js Server Actions without manual parsing?
I'm using Next.js 14 with Server Actions and I'm tired of manually parsing and converting FormData values. Every action looks like this:
'use server'
export async function createUser(formData: ...
1
vote
1
answer
55
views
Phalcon custom validator's allowEmpty method is ignored, how to fix?
I've created a custom validator in Phalcon by extending Phalcon\Filter\Validation\AbstractValidator. I implemented the allowEmpty method to define a custom rule for what should be considered an "...
0
votes
1
answer
81
views
Access expected type in Pydantic within a field wrap validator using the annotated pattern
I'm using a field wrap validator in Pydantic with the Annotated pattern, and I want to access the expected/annotated type of a field from within the validator function. Here's an example of what I ...
0
votes
1
answer
132
views
JS Textarea validation
I am creating a contact form and validating using javascript event listener. The invalid event listener is working for the input elements from the deafult required class added to the input fields. ...
1
vote
2
answers
159
views
Validating file type by NestJS with UploadedFile decorator
I have a very simple validation pipe for accepting MS Word and PDF files.
@UploadedFile(
new ParseFilePipe({
validators: [
new FileTypeValidator({ fileType: '.(doc|docx|pdf)' })...
0
votes
1
answer
93
views
Why am I getting Event validation failed when defining query params in a Godspeed HTTP event?
I’m creating a simple HTTP GET event in the Godspeed framework. My goal is to accept a query parameter called name and return a response. However, when I define the event YAML with type: string ...
2
votes
1
answer
67
views
skforecast insample predictions
Using skforecast, it's straightforward to perform out-of-sample predictions starting from the dates in the last_window_.index of a ForecasterRecursive object. However, I’m unable to find a clear ...
0
votes
0
answers
365
views
Validation problem with Zod Resolver using PrimeVue forms
I'm having somewhat of an issue using Zod form resolver.
Using PrimeVue forms, I have validate-on-value-update activated:
<Form
v-slot="$form"
:initial-values="form.data()"...
2
votes
1
answer
96
views
Why does hitting enter in a textbox cause my regex to fail [duplicate]
I have a regex on a textbox in order to limit it to specific characters. It includes the following /^([A-Za-z0-9 .,':;/?()!-]|\\[rn])*$/
I am validating onBlur and displaying an error message when the ...
1
vote
3
answers
143
views
Validate a globed-like path
I am writing a API for a program. The program has a native support of "globed" paths such as img-0*.png. I would like to know how to be sure that there is at least a file satisfying that ...
1
vote
1
answer
33
views
Looking for a correct way to validate mssql Query
public Mono<String> queryValidation(String connectionId, String query) {
return connectionConfigRepository.findByConnectionId(connectionId)
.switchIfEmpty(Mono.error(new ...
0
votes
1
answer
157
views
My VBA code for creating a validation list in a workbook throws an error in method add formula1, but it works if I create it manually
This is an Excel VBA problem I can't solve.
I have a quite large and complex workbook, with many sheets. The main working sheet is named "Riassuntivo". In it, I create by code different ...
1
vote
1
answer
96
views
Conditional formatting in Excel for product codes with specific prefixes
I need an Excel conditional formatting formula or VBA to identify product names in a column to highlight cells red if the product name contains two or more sub-products (number+letter codes like r600, ...
0
votes
1
answer
50
views
MongoDB Validation Enforce property uniqueness within a multi-nested array for a single document
I have a collection with objects like this:
{
"_id": "test",
"rows": [
{
"id": "r1",
"blocks": [
{
&...
0
votes
2
answers
89
views
How to build a Custom Type with its own config?
I have a dry-validations Contract like so:
class MyContract < Dry::Validation::Contract
config.validate_keys = true
params do
required(:allowed_param).value(:string, :filled?)
optional(:...
1
vote
2
answers
77
views
Visual Studio: XML validation against DTD fails — how to find the error?
Environment: Windows 12, Visual Studio 2022 (Community Edition)
I’m trying to validate an XML file against its DTD in Visual Studio.
When I run the validation, I get the error.
xml file (sample.xml)
&...
2
votes
0
answers
119
views
In Pydantic 2, how do allow missing fields during deserialisation/validation, but require it when creating an instance?
I use pydantic to be able to serialise and deserialise json data stored in a large database. Each of these json strings represent a pydantic model MyModel.
class MyModel(BaseModel):
attr1: int
I ...
0
votes
0
answers
89
views
How to validate the image dimension in Blazor?
According to the ASP.NET Core Blazor file uploads:
OpenReadStream enforces a maximum size in bytes of its Stream. Reading one file or multiple files larger than 500 KB results in an exception. This ...
2
votes
2
answers
285
views
SQLModel and emails
I'm currently working on an api using fastapi and sqlmodel. I'm new to these two and I might have missed something.
I have a user model with an e-mail field. So no email outside my organization is ...
-1
votes
1
answer
83
views
Problem with textbox validation and next control focus
I am validating a textbox (specifically, a Telerik RadTextBox, but I don't think that is the problem). I've tried both RequiredFieldValidator and CustomValidator. When I press Tab, validation works ...
0
votes
0
answers
21
views
Validation Accuracy stuck between 0.5-0.6
I am currently working on a custom VGG model for Breast Cancer Classification using mammography images. It has excellent accuracy for training images but the validation accuracy is stuck at 0.5-0.6. ...
0
votes
3
answers
82
views
How to set custom validation message for HTML input on mouseenter?
I have an ASP.NET Core project and I'm trying to set custom text for the validation tooltip for the HTML form input field. By default, it shows "Please fill out this field". I tried to add ...
6
votes
1
answer
961
views
Pydantic: How to return user friendly validation error messages?
Is there any way to change the validation messages from pydantic? The problem is this: I want to return these validation messages to my frontend but not all of the users prefer the language english ...
1
vote
1
answer
40
views
disable some parts of a form
How can I disable a whole section of a form in TypeScript/React?
Body:
I'm building a form in TypeScript (using React), and I want to disable an entire section of the form — similar to how Stack ...
0
votes
0
answers
47
views
How to handle error reporting and validation of uploaded files using django-formset?
Short version
I'm using django-formset to create a contact form that includes a file upload field. When an incorrect file is selected, no error message is shown. When uploading the form with an ...
1
vote
2
answers
137
views
How can I improve input validation in a C# console application? [closed]
I’m currently working on a Student Grade Management System in C# as part of my learning project. The application allows users to add students, assign grades, calculate averages, and display student ...
0
votes
0
answers
51
views
Setting up the validator gives errors Jersey
I am trying to set up the bean validation in my jersey server. I would like to assure that everytime I get an email in this bean it is not null. But with this current setup, everytime jersey tries to ...
0
votes
1
answer
74
views
Cannot pass validation because lists that populate dropdowns are invalid for some reason
ListingController.cs:
public IActionResult Create()
{
CreateListingViewModel model = new()
{
AllCities = new SelectList(_addressRepo.AllCities()),
AllItems = new SelectList(...
1
vote
3
answers
127
views
Regular expression matching three character words separated by comma and space and all of partial versions of such string
I would like to validate user input in an web application with a regex. The user is allowed to type three character words and separate them by a comma or comma followed by space.
Valid input could be: ...
1
vote
1
answer
86
views
Read-and-validate istream equivalent to fscanf
I have a very simple scenario that looks like
std::ifstream file("myfile.txt");
std::string discard;
int num;
file >> discard >> num; // to consume e.g. HEADER 55
Despite all ...
1
vote
4
answers
152
views
How to Check if User-Entered Numbers Match Winning Lottery Numbers in Any Order (JavaScript)?
I'm working on a simple lottery number checker using JavaScript for my website. The user enters three numbers through a form, and I have three winning numbers stored in an array. I want to check if ...
0
votes
1
answer
353
views
How to collect and return multiple validation errors from service layer in .NET 8 instead of throwing exceptions?
if (!hasAnyPhoneNumber)
throw new NotEmptyException("PhoneNumber", MessageHelper.GetMessage(ErrorMessageName.NOT_EMPTY));
I haven't tried any specific solution yet, but my goal is to ...
0
votes
0
answers
68
views
Nemo Guardrails: Custom action is not recognized
I'm currently trying to implement a custom action within NeMo Guardrails, following your official documentation, but I'm encountering an issue where my custom action isn't being recognized. I've ...
0
votes
2
answers
122
views
Data Validation List based on Matched Cell Reference
I am seeking help with an Match Based Array that is compatible for Data Validation List / Cell Drop Down.
Basically what I need is a Drop down list with options based on a Cell Reference Match with ...