Questions tagged [server-side-validation]
119 questions
0
votes
0 answers
is it possible in .net6 server side validation to automatically return the view with validation displayed when the modelstate is not valid?
I am trying to setup validation on a project when there is no javascript. In the past i thought the .net framework would automatically intercept an invalid post and return to the same view with the same model and show the validation errors in the…

Paul
- 693
- 1
- 10
- 25
0
votes
1 answer
How to validate a field only contains alphanumerics, spaces, dashes & always contains at least one alpha or numeric character?
I have an input field that I need to add validation to in c#. The field should only allow alphanumerics, spaces, dashes, and must contain at least one alpha or numeric character. I have the layout of the function, but I am not sure how to formulate…

duk3csmaj0r
- 25
- 4
0
votes
0 answers
ModelState showing invalid, but the value is there?
I hope this makes sense what I am trying to do
I have an application built with RazorPages that I am adding server side validation to for a Uni Project
I have an edit page with a form that a user can update their details which is to be validated …

uber_wench
- 11
- 2
0
votes
1 answer
How to name properties of child objects while using ValidationMessage
I'm using two kinds of validation: Client Side and Server Side on a Blazor Project.
Client side is using DataAnnotations, as usual and DataAnnotationsValidator and is working just fine.
Server Side is using this custom server side validation…

Erre Efe
- 15,387
- 10
- 45
- 77
0
votes
0 answers
Php server side validation without using $_SERVER["PHP_SELF"]
I am fairly new to server-side validation and I currently post my form values to the page below.

A.Mac
- 203
- 3
- 19
0
votes
2 answers
Partial server side validation for complex property
In ASP.NET Core MVC app, I need to skip model validation for certain complex property in controller's action.
Let's say I have a following model structure:
public class Person
{
public int PersonID { get; set; }
public PersonalInfo…

petra
- 5
- 3
0
votes
1 answer
How to validate space ( ) in RichTextUploadingField by CKEDITOR in django server side
While using RichTextUploadingField by CKEDITOR in an DJANGO project, when i tried saving space though with python codes i tried to validate (.strip() and .isspace()) it got bypass.
when i check the DB the entry in the DB was as…

alwinjoseph
- 1
- 1
0
votes
2 answers
Why use @Valid in Spring MVC when HTML5 Validation exists
Why to use @valid annotation when HTML5 validation exists on the page?
We could focus on business logic rather than adding extra controllers to validate. Is it because there are any bugs using of web pages?
0
votes
1 answer
Client side & Server side validations in ASP.NET MVC
In the ViewModel, I have Data Annotations for few fields.
public class EmployeeContactInfoVM
{
[Key]
public int slNo { get; set; }
[Required]
[Display(Name = "Employee GlobalView ID *")]
[StringLength(8,MinimumLength = 8,ErrorMessage ="GV ID…

Arun kumar M
- 13
- 3
0
votes
0 answers
Server-side validation is repeating on all the field using ajax in Codeigniter
I am using Codeigniter. I am getting the issue on server-side validation error message using ajax. Server-side validation is not displaying properly.
Gender field is required but I am getting the server-side error message on all the field. Also,…

questionbank
- 440
- 8
- 25
0
votes
1 answer
How to throw an alert error when registering an existing email in the database with Angular?
So my question is about when I want to register a new employee with his email on my database, i want Angular to check if the email or the Id of the employee already exist and then if you submit an existing email or id to show an error that it would…

Μιχαηλ Τσιγαρας
- 1
- 2
0
votes
1 answer
ActiveRecord::StatementInvalid (PG::InvalidDatetimeFormat: ERROR: invalid input syntax for type date: ""
In my model, I have:
validates_presence_of :start_date, :message => 'Please enter date.'
validate :start_date_exist_check , on: :create`
def start_date_exist_check
@check_date = Employee.where('start_date = ?', start_date)`
if…

anjali
- 87
- 1
- 12
0
votes
1 answer
Whitelisting recaptcha tokens to avoid asking users to generate new tokens, is there a better solution?
I have a website that has a form with a recaptcha. The form has a lot of server-side validation that can't be moved to the client-side and so it's often for users to submit several forms with the same recaptcha token. The problem is that recaptcha…

Pedro
- 355
- 4
- 18
0
votes
1 answer
Server-side validation showing a blank field and what is the best way to display message from one page to another?
I am learning the PHP and I need to know about the server side error and what is the best way to secure the database. I referred the google and got some valuable information and I applied to my code. Please check my code and assist me more to…

user9437856
- 2,360
- 2
- 33
- 92
0
votes
2 answers
cakephp3- how to do xss filtering?
Cakephp version I'm using is 3.4.x
I have more than a dozen forms in my cakephp 3 application. I wanna implement xss filtering for all forms. What's the easiest way to do this without making changes to all form functions.
I read in one answer that,…

version 2
- 1,049
- 3
- 15
- 36