Questions tagged [foolproof-validation]

MVC Foolproof Validation is a library that complements the Data Annotation validation provided in ASP.NET MVC.

MVC Foolproof Validation is a library that complements the Data Annotation validation provided in ASP.NET MVC.

It's released under the Microsoft Public License.

65 questions
1
vote
1 answer

validating textboxes based on the URL entered

I am trying to validate two textboxes based on the URL that has been entered, the textboxes are for job title and military rank. Generally for most of the routes I have created the job title textbox will be required only three URLs currently require…
CryoFusion87
  • 796
  • 1
  • 8
  • 28
1
vote
2 answers

Why is my design time view scaffolding no longer working after installing Foolproof Validation?

I recently added MVC Foolproof Validation to a new MVC4 app, and now every time I try and scaffold a view using the Add View wizard, I get the following exception [shortened for…
ProfK
  • 49,207
  • 121
  • 399
  • 775
0
votes
0 answers

FooProof Core validating in Asp.NET Core for Validation but shows exception

I am using FoolProof COre in Asp.Net Core 3.0 Application. My Model is public class PaymentReceiveMVm { public int PayMode { get; set; } public string PaymentMode { get; set; } [Column(TypeName = "date")] …
0
votes
1 answer

foolproof.core validation to compare inital date and return date

I was using GreaterThan on model data notation after installing foolproof.core but when I insert a datetime on returndate which is less than initial date error message doesn't get displayed .Do I have to use service configuration or what is the…
0
votes
0 answers

MVC Data Model Validation DateTime with FoolProf

I am validating two dates. I am using FoolProf to validate One date in Greater than the other like this... [DataType(DataType.Date)] public System.DateTime StartDate{ get; set; } [DataType(DataType.Date)] [GreaterThan("StartDate")] public…
Diego
  • 2,238
  • 4
  • 31
  • 68
0
votes
1 answer

Multiple MVC Foolproof Validation

I am using MVC Foolproof Validation for my MVC 5 app. I'm trying to say: EventPlanEnd is not required unless EventPlanStart is filled in. If it is, make sure EventPlanEnd > EventPlanStart. This doesn't seem to work... public…
WebDevGuy2
  • 1,159
  • 1
  • 19
  • 40
0
votes
1 answer

FoolProof MVC GreaterThan not working with time

I have added the unobtrusive.. etc all works except if i have GreaterThan on my second date field StartDate: 2017/02/25 12:00 AM End Date: 2017/02/25 01:03 PM it seems to think that the End Date is not greater, i assume its doing a string comparison…
Zoinky
  • 4,083
  • 11
  • 40
  • 78
0
votes
0 answers

MVC Foolproof validation - case sensitive when using NotEqualTo

I am using MVC Foolproof validation package (https://foolproof.codeplex.com/) to verify if the alias is the same as what was entered for the username. For this i have created a custom validation class and i am using the NotEqualTo attribute like so…
0
votes
2 answers

Using foolproof and requiredif to validate a string field

I have the following fields in my data model: public bool JointAccount { get; set; } [RequiredIf("JointAccount", "true", ErrorMessage = "Please select a Title")] public string JointAccountTitle { get; set; } [RequiredIf("JointAccount", "true",…
Jay
  • 3,012
  • 14
  • 48
  • 99
0
votes
0 answers

StartTime less than EndTime validation not working using foolproof

I have two date fields that I want to make sure that the end date is greater than the start date. It seems to work but not always. When testing out with different dates it stops working. I am using foolproof. Here is the code @using…
rukiman
  • 597
  • 10
  • 32
0
votes
1 answer

MVC Server Side Validation

I am using Foolproof Validation . When calling [RequiredIfTrue("CommonUseStatus")] Foolproof ReqiuredIfAttribute gives System.NullReferenceException. Because CommonUseInfo haven't got CommonUseStatus property. How can I use this Attribute in this…
Ali Fuat
  • 9
  • 2
0
votes
1 answer

Foolproof Unobtrusive Validation

I want to compare two date fields using Foolproof validation where the second field must be greater than the first field. However, both can be null. Even when using PassOnNull = True, the validation fails when both fields are null. This works as…
Jason Butera
  • 2,376
  • 3
  • 29
  • 46
0
votes
0 answers

Foolproof package complext model validation

I have: public class Test { [Required] public string Name { get; set; } [Required] public bool Is1 { get; set; } [RequiredIfTrue("Is1")] public string Name2 { get; set; } public Person Person { get; set; } …
0
votes
0 answers

Access public virtual dropdown value

I have a dropdown list and a datefield. If there is one specific value selected from the dropdown, the datefield should be required. To solve that, I tried to use the requiredIf sttribute from the FoolProof library. But I don't know how to access…
0
votes
1 answer

MVC Foolproof not working for DisplayTextFor

I have a conditional requirement: [Display(Name = "Contract Number:")] [RequiredIf("CandidateType", "Contractor")] public string ContractNumber { get; set; } And in the view: @Html.DisplayTextFor(x => x.CandidateType) …
Dean.DePue
  • 1,013
  • 1
  • 21
  • 45