Questions tagged [validationerror]

The errors encountered during validating the data input.

The errors encountered during validating the data input. The data validation is the process of performing checks on data input to ensure that a program operates on clean, correct and useful data. It uses routines, often called validation rules, validation constraints or check routines, that check for correctness, meaningfulness, and security of data that are input to the system. The validation rules may be implemented through the automated facilities of a data dictionary, or by the inclusion of explicit application program validation logic, or by the some validation framework.

183 questions
95
votes
7 answers

Raise a validation error in a model's save method in Django

I'm not sure how to properly raise a validation error in a model's save method and send back a clear message to the user. Basically I want to know how each part of the "if" should end, the one where I want to raise the error and the one where it…
Bastian
  • 5,625
  • 10
  • 44
  • 68
25
votes
5 answers

Django, show ValidationError in template

I create a registation app, where users can register providing a username, email and a password. What I did is make sure that the email field is unique(as you can see in the code below). But I can't figure out how I can show the error in case the a…
manosim
  • 3,630
  • 12
  • 45
  • 68
18
votes
4 answers

How to show validation errors using redirect in codeigniter?

I have been dealing with a problem for a while. How can I set the validation errors using redirect in a function? This is the code I have in my controller : function send() { $this->form_validation->set_rules('e-mail', 'Email',…
Afshin
  • 2,427
  • 5
  • 36
  • 56
13
votes
1 answer

PyTorch: Add validation error in training

I am using PyTorch to train a cnn model. Here is my Network architecture: import torch from torch.autograd import Variable import torch.nn as nn import torch.nn.functional as F import torch.nn.init as I class Net(nn.Module): def…
Edamame
  • 23,718
  • 73
  • 186
  • 320
10
votes
4 answers

Okay to Paste-in Package-Lock.json from 19 Hours Ago to Fix "ValidationError: Progress Plugin Invalid Options" (Vue 3)?

I'm using Vue 3 and I pushed a version of my project that was working well to GitHub 19 hours ago. About 5 hours later, the problem below occurred when I entered npm run serve which resulted in these lines of information: > zagnetic@0.1.0 serve >…
Mark Gavagan
  • 878
  • 12
  • 45
9
votes
3 answers

How to Highlight Fields on Rails Validation Errors

How do you display form field highlighting for fields that fail validation errors in Rails 3.1? I know that scaffolding automatically generates the css and controller code to handle this, but I was wondering if there was a way to generate that…
kdhuang
  • 129
  • 1
  • 1
  • 6
6
votes
2 answers

ValidationError when creating a SageMaker Model

I'm new to AWS and trying to build a model (from the web console) by referring to their demo. However, when I try to create the model, it gives me the below error. Could not access model data at …
6
votes
1 answer

using f:viewParam with required attribute and commands

I want to share my experience using primefaces, f:viewParam and p:commandButton, and ask a few questions.Take a look at this page:
moretti.fabio
  • 1,128
  • 13
  • 32
5
votes
2 answers

Codeigniter - Displaying individual error message for array fields

Have array of customers each with individual details. Here is a very SIMPLE example. In codeigniter, each customer_name is required $this->form_validation->set_rules('customer_names[]','Customer…
csi
  • 9,018
  • 8
  • 61
  • 81
5
votes
1 answer

Python Marshmallow: Dict validation Error

I'm quite new to marshmallow but my question refers to the issue of handling dict-like objects. There are no workable examples in the Marshmallow documentation. I came across with a simple example here in stack overflow Original question and this…
GLR
  • 157
  • 2
  • 7
5
votes
1 answer

Ruby on Rails - JS Input token, an issue when validation fails

I have a company model which can have many tags. It works fine, but in one occasion it does not work. The occasion is when company model validation fails. After :render => 'edit' it does not show tags in the view. I suspect the data-pre is not…
MJM
  • 61
  • 4
4
votes
1 answer

django admin delete objects in inlines in save_model method

I have two related (via foreignkey relation) models and created admin model for parent with inlines. In several cases (edited in admin by boolean field), i need to delete all previous objects (inlines) and create new ones. I've tried to make it with…
sepulchered
  • 814
  • 7
  • 18
4
votes
2 answers

S3 access denied when trying to run aws cli

using the AWS CLI I'm trying to run aws cloudformation create-stack --stack-name FullstackLambda --template-url https://s3-us-west-2.amazonaws.com/awsappsync/resources/lambda/LambdaCFTemplate.yam --capabilities CAPABILITY_NAMED_IAM --region…
honkskillet
  • 3,007
  • 6
  • 31
  • 47
4
votes
1 answer

Custom error message for Laravel validation rule: Dimensions

I'm trying to validate an image upload that looks like the following: $this->validate($request, [ 'admin_image'=> 'nullable|image|dimensions:min_width=600,min_height=600', ]); when the selected image too small then laravel shows error: The…
Md. A. Apu
  • 769
  • 10
  • 30
4
votes
1 answer

how to check a previous value on a django model

I've got a django model with a field that i want to be always greater than the previous one of the same model instance after an update, like this: class MyModel(models.Model): version = models.FloatField() prev_value = 0 def…
loki
  • 2,271
  • 5
  • 32
  • 46
1
2 3
12 13