Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit f69fc0b

Browse files
[BUGFIX] Add missing fields to edit contact form
The postal and country fields were missing from the edit contact form.
1 parent 42f6423 commit f69fc0b

File tree

1 file changed

+32
-2
lines changed
  • samples/react-redux-patient-demographics-example/src/routes/Patient/Demographics/Contact

1 file changed

+32
-2
lines changed

‎samples/react-redux-patient-demographics-example/src/routes/Patient/Demographics/Contact/ContactComponent.js‎

Lines changed: 32 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,22 @@ class Contact extends Component {
212212
}}
213213
required />
214214
</td>
215-
<td></td>
215+
<td>
216+
<FormsyInput value={this.state.postal}
217+
onChange={this.handleInputChange}
218+
name='postal'
219+
label='Postal'
220+
validations={{
221+
maxLength: 5,
222+
minLength: 5
223+
}}
224+
validationErrors={{
225+
isDefaultRequiredValue: 'Valid postal code is required',
226+
maxLength: 'You must enter a valid postal code',
227+
minLength: 'You must enter a valid postal code'
228+
}}
229+
required />
230+
</td>
216231
</tr>
217232
<tr>
218233
<td>
@@ -231,7 +246,22 @@ class Contact extends Component {
231246
}}
232247
required />
233248
</td>
234-
<td></td>
249+
<td>
250+
<FormsyInput value={this.state.country}
251+
onChange={this.handleInputChange}
252+
name='country'
253+
label='Country'
254+
validations={{
255+
maxLength: 20,
256+
minLength: 2
257+
}}
258+
validationErrors={{
259+
isDefaultRequiredValue: 'Valid country is required',
260+
maxLength: 'You must not enter more than 20 characters',
261+
minLength: 'You must enter at least 2 characters'
262+
}}
263+
required />
264+
</td>
235265
</tr>
236266
<tr>
237267
<td>

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /