)>}]
شركة التطبيقات المتكاملة لتصميم وبرمجة البرمجيات الخاصة ش.ش.و.
Integrated Applications Programming Company
Home » Code Library » ChangePasswordViewModel (Ia.Wa.Models.ManageViewModels)

Public general use code classes and xml files that we've compiled and used over the years:

    1: // Licensed to the .NET Foundation under one or more agreements.
    2: // The .NET Foundation licenses this file to you under the MIT license.
    3:  
    4: using System.ComponentModel.DataAnnotations;
    5:  
    6: namespace Ia.Wa.Models.ManageViewModels
    7: {
    8:     ////////////////////////////////////////////////////////////////////////////
    9:  
   10:     /// <summary publish="true">
   11:     ///
   12:     /// </summary>
   13:     /// 
   14:     /// <remarks> 
   15:     /// Copyright © 2006-2025 Jasem Y. Al-Shamlan (info@ia.com.kw), Integrated Applications - Kuwait. All Rights Reserved.
   16:     ///
   17:     /// This library is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by
   18:     /// the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
   19:     ///
   20:     /// This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
   21:     /// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
   22:     /// 
   23:     /// You should have received a copy of the GNU General Public License along with this library. If not, see http://www.gnu.org/licenses.
   24:     /// 
   25:     /// Copyright notice: This notice may not be removed or altered from any source distribution.
   26:     /// </remarks> 
   27:     public class ChangePasswordViewModel
   28:     {
   29:         [Required]
   30:         [DataType(DataType.Password)]
   31:         [Display(Name = "Current password")]
   32:         public string OldPassword { get; set; }
   33:  
   34:         [Required]
   35:         [StringLength(100, ErrorMessage = "The {0} must be at least {2} characters long.", MinimumLength = 6)]
   36:         [DataType(DataType.Password)]
   37:         [Display(Name = "New password")]
   38:         public string NewPassword { get; set; }
   39:  
   40:         [DataType(DataType.Password)]
   41:         [Display(Name = "Confirm new password")]
   42:         [Compare("NewPassword", ErrorMessage = "The new password and confirmation password do not match.")]
   43:         public string ConfirmPassword { get; set; }
   44:     }
   45: }