Michele: validation email + controllo cod fis par.iva per eliminare gli spazi
This commit is contained in:
parent
851363defe
commit
abe5135264
@ -537,7 +537,7 @@ namespace VirtualTask.Controllers
|
|||||||
// Input: il Codice Fiscale da verificare, 16 caratteri
|
// Input: il Codice Fiscale da verificare, 16 caratteri
|
||||||
// Output: true/false
|
// Output: true/false
|
||||||
// 2010.12.05
|
// 2010.12.05
|
||||||
Codice = Codice.ToUpper();
|
Codice = Codice.Trim().ToUpper();
|
||||||
if (Codice.Length != 16)
|
if (Codice.Length != 16)
|
||||||
return false; // errore
|
return false; // errore
|
||||||
else
|
else
|
||||||
@ -757,7 +757,7 @@ namespace VirtualTask.Controllers
|
|||||||
{
|
{
|
||||||
if (_myCountry.CompareTo("IT") == 0)
|
if (_myCountry.CompareTo("IT") == 0)
|
||||||
{
|
{
|
||||||
if (_myVatNumber.Length == 11)
|
if (_myVatNumber.Trim().Length == 11)
|
||||||
{
|
{
|
||||||
Int32 s = 0;
|
Int32 s = 0;
|
||||||
int n = 1;
|
int n = 1;
|
||||||
|
|||||||
@ -19,7 +19,8 @@ namespace VirtualTask.Models
|
|||||||
|
|
||||||
[Display(Name = "Email")]
|
[Display(Name = "Email")]
|
||||||
[StringLength(254)]
|
[StringLength(254)]
|
||||||
[RegularExpression("^[a-zA-Z0-9_\\.-]+@([a-zA-Z0-9-]+\\.)+[a-zA-Z]{2,6}$", ErrorMessage = "formato campo Email non valido")]
|
//[RegularExpression("^[a-zA-Z0-9_\\.-]+@([a-zA-Z0-9-]+\\.)+[a-zA-Z]{2,6}$", ErrorMessage = "formato campo Email non valido")]
|
||||||
|
[EmailAddress(ErrorMessage = "formato campo Email non valido")]
|
||||||
/// <summary>email</summary>
|
/// <summary>email</summary>
|
||||||
public string? an_email { get; set; }
|
public string? an_email { get; set; }
|
||||||
|
|
||||||
@ -50,7 +51,8 @@ namespace VirtualTask.Models
|
|||||||
|
|
||||||
[Display(Name = "Pec")]
|
[Display(Name = "Pec")]
|
||||||
[StringLength(254)]
|
[StringLength(254)]
|
||||||
[RegularExpression("^[a-zA-Z0-9_\\.-]+@([a-zA-Z0-9-]+\\.)+[a-zA-Z]{2,6}$", ErrorMessage = "formato campo Email non valido")]
|
//[RegularExpression("^[a-zA-Z0-9_\\.-]+@([a-zA-Z0-9-]+\\.)+[a-zA-Z]{2,6}$", ErrorMessage = "formato campo Email non valido")]
|
||||||
|
[EmailAddress(ErrorMessage = "formato campo Email non valido")]
|
||||||
/// <summary>pec</summary>
|
/// <summary>pec</summary>
|
||||||
public string? an_empec { get; set; }
|
public string? an_empec { get; set; }
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user