Class VerifyPhoneNumberForm
Represents the code a phone number received, typed back to confirm the number.
public class VerifyPhoneNumberForm
- Inheritance
-
VerifyPhoneNumberForm
- Inherited Members
Remarks
The number itself is never taken from this form: it is the one the code was sent to, kept by the server between the two steps.
Properties
Code
Gets or sets the code the text message carried.
[Display(Name = "VerificationCode", ResourceType = typeof(Fields))]
[Required(ErrorMessageResourceName = "XRequired", ErrorMessageResourceType = typeof(Messages))]
[MinLength(4, ErrorMessageResourceName = "XMustHaveAtLeastYCharacters", ErrorMessageResourceType = typeof(Messages))]
[MaxLength(11, ErrorMessageResourceName = "XMustHaveUpToYCharacters", ErrorMessageResourceType = typeof(Messages))]
public virtual string? Code { get; set; }
Property Value
Remarks
Four to ten digits, as providers send them; up to eleven characters so a code typed with a space still passes. Strip spaces and hyphens before verifying it.