Skip to content

Commit

Permalink
Merge pull request #22 from IliyanIlievPH/master
Browse files Browse the repository at this point in the history
Make fields in PartnerContact optional
  • Loading branch information
IliyanIlievPH committed Jun 29, 2020
2 parents c106eda + de9f5fd commit 1280bd4
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 16 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations;
using JetBrains.Annotations;
using MAVN.Service.CustomerProfile.Client.Models.Constants;

Expand All @@ -19,29 +19,25 @@ public class PartnerContactRequestModel
/// <summary>
/// The Email of the Contact person
/// </summary>
[Required, DataType(DataType.EmailAddress)]
[RegularExpression(ValidationConstants.EmailValidationPattern)]
[DataType(DataType.EmailAddress)]
[MaxLength(100)]
public string Email { get; set; }

/// <summary>
/// Contact First name
/// </summary>
[Required]
[MaxLength(100)]
public string FirstName { get; set; }

/// <summary>
/// Contact Last name
/// </summary>
[Required]
[MaxLength(100)]
public string LastName { get; set; }

/// <summary>
/// Contact Phone number
/// </summary>
[Required]
[MaxLength(50)]
public string PhoneNumber { get; set; }
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations;
using JetBrains.Annotations;
using MAVN.Service.CustomerProfile.Client.Models.Constants;

namespace MAVN.Service.CustomerProfile.Client.Models.Requests
{
Expand All @@ -18,30 +17,25 @@ public class PartnerContactUpdateRequestModel

/// <summary>
/// The contact first name.
/// </summary>
[Required]
[MaxLength(100)]
public string FirstName { get; set; }

/// <summary>
/// The contact last name.
/// </summary>
[Required]
[MaxLength(100)]
public string LastName { get; set; }

/// <summary>
/// The contact phone number.
/// </summary>
[Required]
[MaxLength(50)]
public string PhoneNumber { get; set; }

/// <summary>
/// The contact phone number.
/// </summary>
[Required, DataType(DataType.EmailAddress)]
[RegularExpression(ValidationConstants.EmailValidationPattern)]
[DataType(DataType.EmailAddress)]
[MaxLength(100)]
public string Email { get; set; }
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using MAVN.Common.Encryption;

Expand All @@ -12,7 +12,6 @@ public abstract class PartnerContactBaseEntity
public string LocationId { get; set; }

[Column("email")]
[Required]
[EncryptedProperty]
public string Email { get; set; }

Expand Down

0 comments on commit 1280bd4

Please sign in to comment.