Questions tagged [compare-attribute]

Class that provides ability to compare two properties of a model.

6 questions
20
votes
3 answers

Custom ErrorMessage for Compare attribute does not work

Steps to reproduce: Create a new MVC 5 project with Individual User Accounts. Look at the ErrorMessage specified in RegisterViewModel for the ConfirmPassword property. It is "The password and confirmation password do not match.". Build and run the…
JLe
  • 2,835
  • 3
  • 17
  • 30
6
votes
2 answers

Yii2 Date compare validation

I have model rules() like below, but it is not working. It is showing error message always. public function rules() { return [ [['start_date','end_date'], 'date', 'format' => 'php:F d Y'], …
shreenu konapala
  • 379
  • 1
  • 3
  • 7
1
vote
0 answers

Opposite attribute to compare attribute in asp.net mvc

Can i have a not compare attribute which is opposite to compare attribute in asp.net mvc. I am developing a reset password application. I have used a compare attribute for new password and confirm password. I want to check if the current password…
user2998990
  • 970
  • 5
  • 18
  • 36
0
votes
1 answer

Compare similar values within a table in power BI

I have fields within a table with values originally filled in by hand. Even if the same values are entered/meant, there can be "slight" deviations. Now I want to compare whether values in 2 columns within a row are quite similar. If there is some…
Anna
  • 1
  • 3
0
votes
0 answers

CompareAttribute always returns false

I have an auto-generated partial class for my model, I've extended it by creating a metadata class that decorates the fields/properties with metadata and attributes. I've added another partial class so I can give it a string property of email, but I…
user2336660
0
votes
1 answer

Confirm email doesn't work in asp.net mvc

using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.ComponentModel.DataAnnotations; using WebValidation.Common; using System.Web.Mvc; namespace WebValidation.Models { …
Leah
  • 15
  • 1
  • 6