Account No* – Minimum and maximum of 8 numbers only. It should accept the first number is a "0" only
BSB* – Minimum and maximum of 6 numbers only. ACCEPTABLE FORMAT IS : 000-000 (this is example only. Length: must be 6 numbers only.
[Required(ErrorMessage = "Please enter the BSB")] [Display(Name = "BSB")] [RegularExpression("^[0-9]*$", ErrorMessage = "Please Enter only Numbers")] [StringLength(6, ErrorMessage = "The BSB must be 6 numbers only.", MinimumLength = 6)] public string BSB { get; set; } [Required(ErrorMessage = "Please enter the AccountNo")] [RegularExpression("^[0-9]*$", ErrorMessage = "Please Enter only Numbers")] [StringLength(8, ErrorMessage = "The BankAccountNo must be 8 numbers only.", MinimumLength = 8)] public string BankAccountNo { get; set; }
"^0[0-9]{7}$"
"^[0-9]{3}-[0-9]{3}$"
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)