Most voted "model-validation" questions
18 questions
Sort by count of
-
8
votes1
answer3777
viewsWhen should I use Modelstate.Isvalid?
When should I use the ModelState.isValid? Is it only in the insertion of data? And in the case of update and delete? We need?
-
3
votes1
answer425
viewsEF6 Entityvalidationerrors error in filled property
I have a similar problem in two ASP.NET applications with Entity Framework. When I try to update an entity that already has all the required attributes filled I get an exception from…
c# mvc entity-framework-6 validation model-validationasked 9 years, 6 months ago Eduardo Barbosa Oliveira da Si 45 -
3
votes1
answer557
viewsValidate composite key with Laravel?
I have a table where employees of a company are inserted with the following fields; id, name, email, use_id, role_id. user_id is the id of the company the employee works for. The validation I need…
-
2
votes1
answer1692
viewsDataannotation: How to validate "e-mail" property, check whether or not it exists in the database, with attribute other than in the client and yes in the Server
I have a layered application, and in my presentation layer, I have a ViewModel that is UsuarioViewModel inside this I have a Property calling for public email {get; set;}. Already this validating…
-
2
votes1
answer819
viewsDate validation in the Asp Net Core model?
I have a model and wanted to validate the final date (which should be equal to or greater the initial date) public class MyModel { [Key] public int ModelId { get; set; } [Display(Name = "Início")]…
-
2
votes1
answer552
viewsHow to accept 0 and negative values in decimal attribute using Dataannotations?
I have a class with values decimal which may receive a value of -10.00 to 10.00 (including 0), in Sql Server the equivalent value is a Numeric(5,2). The problem is that by creating my class…
-
2
votes1
answer659
viewsCause form validation on an Asp.net link mvc 5
Good afternoon, everyone! I have a form, I created the rules using Datanotations and it works great when I use a button or input type Submit within my form. Validates very well! I want to exchange…
asp.net asp.net-mvc-5 jquery-validate model-validation unobtrusiveasked 9 years, 5 months ago Fabio Luis Rodrigues 31 -
1
votes2
answers672
viewsValidation model always fails
I have the following models: public class Local { [Key] public int Id { get; set; } public virtual Grupo Grupo { get; set; } } public class Grupo { [Key] public int Id { get; set; } [Required]…
-
1
votes0
answers20
viewsisUnique valitadion not working cakephp 2x
In my template, I created a valitaion for my email field, where if you have another email it shows that it is not possible to register, but this validation is not working. public $validate = array(…
-
1
votes0
answers366
viewsjavax.faces.Validator.BeanValidator.MESSAGE={1} {0}
I created a form where I have the following Name, Job, Login and Password fields. I’m using the javax.faces.validator.BeanValidator.MESSAGE={1} {0} to returns error message to the user. I know it is…
-
1
votes1
answer58
viewsproblem with Java validation
I’m implementing validationBean in my project, and I’m having trouble validating a field, but apparently it’s all right in the settings I made in my project as you can see: Bundle:…
-
1
votes1
answer328
viewsLaravel Validator require
When placing the option required in the validation rules of Laravel $validator=\Validator::make($request->all(),['po_bairro'=>'require|string|min:5|max:50']); it requires you to have the value…
-
1
votes1
answer331
viewsValidate non-mandatory fields using Laravel Validation 5.8
I would like to validate a field and make that field not mandatory. I know that for him to be obligatory I must wear required but I didn’t use it, since I only wanted to validate an email if it was…
-
0
votes1
answer18
viewsValidates uniqueness with one exception
Good morning, I am a beginner in Rails and I have the following problem: I need to do a validation on my model where the content needs to be unique except when it is '000000'. I’ve tried to use:…
-
0
votes1
answer158
viewsValidate fields with javascript in Safari browser
I’m having trouble trying to validate form fields, via Javascript, in Safari browser. The HTML code: <div class="modal fade" id="remarcar" tabindex="-1" role="dialog"…
-
0
votes1
answer15
viewsHow to put the validation rule only when saving and not validating in the update in Django admin with python?
I am developing in Django the following application of course management, in the register of a class I have a registration informing the amount of vacancies for doctors and academics, and in the…
-
-1
votes1
answer168
viewsValidation with more Net Core MVC fields?
I need to validate on a form made in ASPNet Core MVC, but in this validation I need to use more than one field, example below: Models: public class Fornecedor { public virtual int ID { get; set; }…
-
-2
votes1
answer73
viewsLaravel Create composite key for pivot table?
I would like to know how it is possible to perform validation in the 6.x Standard for composite keys ? I am wanting to insert new data a pivot table that has many link to many with two other tables.…