|
50 | 50 | <div class="mb-3"> |
51 | 51 | <%= f.label :email, 'Email Address', class: 'form-label' %> |
52 | 52 | <%= f.email_field :email, autofocus: true, required: true, |
53 | | - class: "form-control#{' is-invalid' if @form.errors[:email].any?}", |
54 | | - data: { action: 'blur->better_together--form-validation#validate' } %> |
| 53 | + class: "form-control#{' is-invalid' if @form.errors[:email].any?}" %> |
55 | 54 | <small class="form-text text-muted">This will be your primary login and how the platform contacts you.</small> |
56 | 55 | <% if @form.errors[:email].any? %> |
57 | 56 | <div class="invalid-feedback d-block"><%= @form.errors[:email].join(', ') %></div> |
|
63 | 62 | <%= f.label :password, 'Password', class: 'form-label' %> |
64 | 63 | <%= f.password_field :password, required: true, minlength: min_password_length, |
65 | 64 | class: "form-control#{' is-invalid' if @form.errors[:password].any?}", |
66 | | - data: { action: 'blur->better_together--form-validation#validate', 'better_together--form-validation-min-length-value': min_password_length } %> |
| 65 | + data: { 'better_together--form-validation-min-length-value': min_password_length } %> |
67 | 66 | <small class="form-text text-muted"> |
68 | 67 | Your password must be at least <%= min_password_length %> characters long. Use a mix of upper and lowercase letters, numbers, and symbols for extra security. |
69 | 68 | </small> |
|
77 | 76 | <%= f.label :password_confirmation, 'Confirm Password', class: 'form-label' %> |
78 | 77 | <%= f.password_field :password_confirmation, required: true, minlength: min_password_length, |
79 | 78 | class: "form-control#{' is-invalid' if @form.errors[:password_confirmation].any?}", |
80 | | - data: { action: 'blur->better_together--form-validation#validate', 'better_together--form-validation-min-length-value': min_password_length } %> |
| 79 | + data: { 'better_together--form-validation-min-length-value': min_password_length } %> |
81 | 80 | <% if @form.errors[:password_confirmation].any? %> |
82 | 81 | <div class="invalid-feedback d-block"><%= @form.errors[:password_confirmation].join(', ') %></div> |
83 | 82 | <% end %> |
|
94 | 93 | <div class="mb-3"> |
95 | 94 | <%= person_form.label :name, 'Full Name', class: 'form-label' %> |
96 | 95 | <%= person_form.text_field :name, required: true, |
97 | | - class: "form-control#{' is-invalid' if @form.errors[:name].any?}", |
98 | | - data: { action: 'blur->better_together--form-validation#validate' } %> |
| 96 | + class: "form-control#{' is-invalid' if @form.errors[:name].any?}" %> |
99 | 97 | <small class="form-text text-muted"> |
100 | 98 | Use your real name or the name you want your community to recognize you by. |
101 | 99 | </small> |
|
107 | 105 | <!-- Username/Identifier Field --> |
108 | 106 | <div class="mb-3"> |
109 | 107 | <%= person_form.label :identifier, 'Username', class: 'form-label' %> |
110 | | - <%= person_form.text_field :identifier, required: true, |
111 | | - class: "form-control#{' is-invalid' if @form.errors[:identifier].any?}", |
112 | | - data: { action: 'blur->better_together--form-validation#validate' } %> |
| 108 | + <%= person_form.text_field :identifier, required: true, min: 3, max: 20, |
| 109 | + class: "form-control#{' is-invalid' if @form.errors[:identifier].any?}" %> |
113 | 110 | <small class="form-text text-muted"> |
114 | | - Your unique handle (no spaces). This will appear in your profile URL and mentions. |
| 111 | + Your unique handle (no spaces). This will appear in your profile URL and mentions. Minimum 3 characters |
115 | 112 | </small> |
116 | 113 | <% if @form.errors[:identifier].any? %> |
117 | 114 | <div class="invalid-feedback d-block"><%= @form.errors[:identifier].join(', ') %></div> |
|
122 | 119 | <div class="mb-3"> |
123 | 120 | <%= person_form.label :description, 'Short Bio', class: 'form-label' %> |
124 | 121 | <%= person_form.text_area :description, required: true, rows: 3, |
125 | | - class: "form-control#{' is-invalid' if @form.errors[:description].any?}", |
126 | | - data: { action: 'blur->better_together--form-validation#validate' } %> |
| 122 | + class: "form-control#{' is-invalid' if @form.errors[:description].any?}" %> |
127 | 123 | <small class="form-text text-muted"> |
128 | 124 | Introduce yourself to the community. Why are you starting this platform? What’s your vision? |
129 | 125 | </small> |
|
0 commit comments