Skip to content

Commit

Permalink
Add Display Name titles for first/last name; remove required html attr
Browse files Browse the repository at this point in the history
  • Loading branch information
bradymholt committed May 25, 2017
1 parent a353c91 commit 9dee195
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion api/Models/Contact.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,11 @@ public class Contact

[Required]
[MinLength(3)]

[Display(Name = "Last Name")]
public string lastName { get; set; }

[Required]
[Display(Name = "First Name")]
public string firstName { get; set; }

public string phone { get; set; }
Expand Down
4 changes: 2 additions & 2 deletions client-web/components/ContactForm.vue
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@
<form v-on:submit.prevent="onSubmit">
<div v-bind:class="{ 'has-danger': errors.lastName }" class="form-group">
<label htmlFor="inputLastName" class="form-control-label">Last Name</label>
<input type="text" autoFocus name="lastName" id="inputLastName" v-model="contact.lastName" class="form-control form-control-danger" required />
<input type="text" autoFocus name="lastName" id="inputLastName" v-model="contact.lastName" class="form-control form-control-danger" />
<div class="form-control-feedback">{{ firstError(errors.lastName) }}</div>
</div>
<div v-bind:class="{ 'has-danger': errors.firstName }" class="form-group">
<label htmlFor="inputFirstName" class="form-control-label">First Name</label>
<input type="text" name="firstName" id="inputFirstName" v-model="contact.firstName" class="form-control form-control-danger" required />
<input type="text" name="firstName" id="inputFirstName" v-model="contact.firstName" class="form-control form-control-danger" />
<div class="form-control-feedback">{{ firstError(errors.firstName) }}</div>
</div>
<div v-bind:class="{ 'has-danger': errors.email }" class="form-group">
Expand Down

0 comments on commit 9dee195

Please sign in to comment.