Cleanup.
This commit is contained in:
parent
166db82ed3
commit
e6959a82f2
@ -9,9 +9,13 @@ namespace GrossesMitaines.Models
|
|||||||
{
|
{
|
||||||
public class RequestViewModel
|
public class RequestViewModel
|
||||||
{
|
{
|
||||||
|
[Display(Prompt ="NOM COMPLET")]
|
||||||
public string Name { get; set; }
|
public string Name { get; set; }
|
||||||
|
[Display(Prompt = "COURRIEL")]
|
||||||
public string Email { get; set; }
|
public string Email { get; set; }
|
||||||
|
[Display(Prompt = "TÉLÉPHONE")]
|
||||||
public string Phone { get; set; }
|
public string Phone { get; set; }
|
||||||
|
[Display(Prompt = "VOS COMMENTAIRES")]
|
||||||
public string Message { get; set; }
|
public string Message { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -24,12 +28,12 @@ namespace GrossesMitaines.Models
|
|||||||
.MinimumLength(2).WithMessage("Votre nom doit être de 2 lettres minimum");
|
.MinimumLength(2).WithMessage("Votre nom doit être de 2 lettres minimum");
|
||||||
|
|
||||||
RuleFor(x => x.Email)
|
RuleFor(x => x.Email)
|
||||||
.NotEmpty().WithMessage("Un Email est requis")
|
.NotEmpty().WithMessage("Une adresse courriel est requise")
|
||||||
.Matches("^[\\w-\\.]+@([\\w-]+\\.)+[\\w-]{2,4}$").WithMessage("Format non valide!");
|
.EmailAddress().WithMessage("Format non valide!");
|
||||||
|
|
||||||
RuleFor(x => x.Phone)
|
RuleFor(x => x.Phone)
|
||||||
.NotEmpty().WithMessage("Vous devez entrer votre téléphone")
|
.NotEmpty().WithMessage("Vous devez entrer votre téléphone")
|
||||||
.Matches("^[0-9][0-9][0-9]-[0-9][0-9][0-9]-[0-9][0-9][0-9][0-9]$").WithMessage("Téléphone non valide!");
|
.Matches("^\\s*(?:\\+?(\\d{1}))?[-. (]*(\\d{3})[-. )]*(\\d{3})[-. ]*(\\d{4})$").WithMessage("Téléphone non valide!");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -21,37 +21,40 @@
|
|||||||
<br>
|
<br>
|
||||||
<br>
|
<br>
|
||||||
<vc:en-vedette></vc:en-vedette>
|
<vc:en-vedette></vc:en-vedette>
|
||||||
|
<br>
|
||||||
|
<br>
|
||||||
|
<br>
|
||||||
|
<br>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-12 bg-info">
|
<div class="col-md-12 bg-info">
|
||||||
<section>
|
<section>
|
||||||
<form asp-controller="Home" asp-action="Demande" asp-route-returnurl="/Home/Index" method="post" class="form-horizontal" role="form">
|
<form asp-controller="Home" asp-action="Demande" asp-route-returnurl="/Home/Index" method="post" class="form-horizontal" role="form">
|
||||||
<h4 class="text-center text-white">Demander une renconte!</h4>
|
<h4 class="text-center text-white">Demander une rencontre!</h4>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<div class="col-md-12">
|
<div class="col-md-12">
|
||||||
<label class="text-white">Nom*</label>
|
<label class="text-white">Nom*</label>
|
||||||
<input asp-for="Name" class="form-control" value="NOM COMPLET" />
|
<input asp-for="Name" class="form-control" />
|
||||||
<span asp-validation-for="Name" class="text-danger"></span>
|
<span asp-validation-for="Name" class="text-danger"></span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<div class="col-md-12">
|
<div class="col-md-12">
|
||||||
<label class="text-white">Email*</label>
|
<label class="text-white">Email*</label>
|
||||||
<input asp-for="Email" class="form-control" value="COURRIEL" />
|
<input asp-for="Email" class="form-control" />
|
||||||
<span asp-validation-for="Email" class="text-danger"></span>
|
<span asp-validation-for="Email" class="text-danger"></span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<div class="col-md-12">
|
<div class="col-md-12">
|
||||||
<label class="text-white">Téléphone*</label>
|
<label class="text-white">Téléphone*</label>
|
||||||
<input asp-for="Phone" class="form-control" value="TÉLÉPHONE EX: 450-111-1111" />
|
<input asp-for="Phone" class="form-control" />
|
||||||
<span asp-validation-for="Phone" class="text-danger"></span>
|
<span asp-validation-for="Phone" class="text-danger"></span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<div class="col-md-12">
|
<div class="col-md-12">
|
||||||
<label class="text-white">Message</label>
|
<label class="text-white">Message</label>
|
||||||
<input asp-for="Message" class="form-control" value="VOS COMMENTAIRES" rows="3"/>
|
<input asp-for="Message" class="form-control" rows="3"/>
|
||||||
<span asp-validation-for="Message" class="text-danger"></span>
|
<span asp-validation-for="Message" class="text-danger"></span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
<div class="carousel-item bg-secondary rounded active">
|
<div class="carousel-item bg-secondary rounded active">
|
||||||
<div class="row text-primary" style="font-family:Arial;">
|
<div class="row text-primary" style="font-family:Arial;">
|
||||||
<div class="col-6 my-auto">
|
<div class="col-6 my-auto">
|
||||||
<img class="d-block w-100" src="img/ceintureflechee.jpg" style="width:auto;max-height:200px;">
|
<img class="d-block w-100" src="~/img/ceintureflechee.jpg" style="width:auto;max-height:200px;">
|
||||||
</div>
|
</div>
|
||||||
<div class="col-6 text-white">
|
<div class="col-6 text-white">
|
||||||
<h3>Ceinture flèchée</h3>
|
<h3>Ceinture flèchée</h3>
|
||||||
@ -23,7 +23,7 @@
|
|||||||
<div class="carousel-item bg-secondary rounded">
|
<div class="carousel-item bg-secondary rounded">
|
||||||
<div class="row text-primary" style="font-family:Arial;">
|
<div class="row text-primary" style="font-family:Arial;">
|
||||||
<div class="col-6 my-auto">
|
<div class="col-6 my-auto">
|
||||||
<img class="d-block w-100" src="img/pantouflesCH.jpg" style="width:auto;max-height:200px;">
|
<img class="d-block w-100" src="~/img/pantouflesCH.jpg" style="width:auto;max-height:200px;">
|
||||||
</div>
|
</div>
|
||||||
<div class="col-6 text-white">
|
<div class="col-6 text-white">
|
||||||
<h3>Pantoufles du Canadien en Phentex</h3>
|
<h3>Pantoufles du Canadien en Phentex</h3>
|
||||||
@ -36,7 +36,7 @@
|
|||||||
<div class="carousel-item bg-secondary rounded">
|
<div class="carousel-item bg-secondary rounded">
|
||||||
<div class="row text-primary" style="font-family:Arial;">
|
<div class="row text-primary" style="font-family:Arial;">
|
||||||
<div class="col-6 my-auto">
|
<div class="col-6 my-auto">
|
||||||
<img class="d-block w-100" src="img/jeanlucmongrain.jpg" style="width:auto;max-height:200px;">
|
<img class="d-block w-100" src="~/img/jeanlucmongrain.jpg" style="width:auto;max-height:200px;">
|
||||||
</div>
|
</div>
|
||||||
<div class="col-6 text-white">
|
<div class="col-6 text-white">
|
||||||
<h3>Jean-Luc Mongrain</h3>
|
<h3>Jean-Luc Mongrain</h3>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user