Skip to content

Commit b3107d3

Browse files
committed
Update demo, add margin-top for buttons container
1 parent 660aa13 commit b3107d3

File tree

2 files changed

+26
-4
lines changed

2 files changed

+26
-4
lines changed

VueForm/components/Form/styles.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ const styles = {
55
flexWrap: 'no-wrap',
66
justifyContent: 'flex-start',
77
alignItems: 'flex-start',
8+
marginTop: '44px',
89
},
910
buttons_center: {
1011
justifyContent: 'center',

example/src/forms/AllValidationsForm/AllValidationsForm.js

Lines changed: 25 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ export default {
4141
render() {
4242
return (
4343
<div>
44-
<h1>Basic Form</h1>
44+
<h1>All Validations Form</h1>
4545
<div class="wrapper">
4646
<div class="form">
4747
<Form reset submit="Save" labelPosition="top" handleSubmit={this.handleSubmit}>
@@ -66,8 +66,17 @@ export default {
6666
name="companies"
6767
label="What companies do you prefer?"
6868
options={this.companiesOptions}
69+
validators={[validators.length({ min: 2 }, 'Please, select at least 2 companies')]}
70+
/>
71+
<InputNumber
72+
formItem
73+
controls
74+
name="age"
75+
label="Select your age"
76+
value={26}
77+
min={15}
78+
max={30}
6979
/>
70-
<InputNumber formItem controls name="age" label="Select your age" value={26} />
7180
<div>
7281
<Radio name="word" value="A">
7382
A
@@ -82,6 +91,7 @@ export default {
8291
name="browser"
8392
label="Which browser do you use?"
8493
options={this.browsersOptions}
94+
validators={[validators.isRequired('Please select a browser from list below')]}
8595
/>
8696
<Select
8797
formItem
@@ -103,9 +113,20 @@ export default {
103113
label="What should we do with lights?"
104114
activeText="ON"
105115
inactiveText="OFF"
116+
validators={[validators.isRequired()]}
117+
/>
118+
<TimePicker
119+
formItem
120+
name="time"
121+
label="Select Time"
122+
validators={[validators.isRequired()]}
123+
/>
124+
<DatePicker
125+
formItem
126+
name="date"
127+
label="Select Date"
128+
validators={[validators.isRequired()]}
106129
/>
107-
<TimePicker formItem name="time" label="Select Time" />
108-
<DatePicker formItem name="date" label="Select Date" />
109130
</Form>
110131
</div>
111132
<div class="values">

0 commit comments

Comments
 (0)