Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

65 lines (60 sloc) 2.362 kb
//-------------------------------------------------------------------------------
// <copyright file="RegisterModel.cs" company="bbv Software Services AG">
// Copyright (c) 2010 bbv Software Services AG
// Author: Remo Gloor (remo.gloor@gmail.com)
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// </copyright>
//-------------------------------------------------------------------------------
namespace SampleApplication.Models.Account
{
using System.ComponentModel.DataAnnotations;
/// <summary>
/// The view model to register a new user
/// </summary>
public class RegisterModel
{
/// <summary>
/// Gets or sets the name of the user.
/// </summary>
/// <value>The name of the user.</value>
[Required]
[Display(Name = "User name")]
public string UserName { get; set; }
/// <summary>
/// Gets or sets the email address.
/// </summary>
/// <value>The email address.</value>
[Required]
[DataType(DataType.EmailAddress)]
[Display(Name = "Email address")]
public string Email { get; set; }
/// <summary>
/// Gets or sets the password.
/// </summary>
/// <value>The password.</value>
[Required]
[ValidatePasswordLength]
[DataType(DataType.Password)]
[Display(Name = "Password")]
public string Password { get; set; }
/// <summary>
/// Gets or sets the password confirmation.
/// </summary>
/// <value>The password confirmation.</value>
[DataType(DataType.Password)]
[Display(Name = "Confirm password")]
[Compare("Password", ErrorMessage = "The password and confirmation password do not match.")]
public string ConfirmPassword { get; set; }
}
}
Jump to Line
Something went wrong with that request. Please try again.