diff options
Diffstat (limited to 'src/containers/settings/EditServiceScreen.js')
-rw-r--r-- | src/containers/settings/EditServiceScreen.js | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/containers/settings/EditServiceScreen.js b/src/containers/settings/EditServiceScreen.js index c26195a1e..67c2731fc 100644 --- a/src/containers/settings/EditServiceScreen.js +++ b/src/containers/settings/EditServiceScreen.js | |||
@@ -121,7 +121,7 @@ export default class EditServiceScreen extends Component { | |||
121 | label: intl.formatMessage(messages.team), | 121 | label: intl.formatMessage(messages.team), |
122 | placeholder: intl.formatMessage(messages.team), | 122 | placeholder: intl.formatMessage(messages.team), |
123 | value: service.team, | 123 | value: service.team, |
124 | validate: [required], | 124 | validators: [required], |
125 | }, | 125 | }, |
126 | }); | 126 | }); |
127 | } | 127 | } |
@@ -132,24 +132,24 @@ export default class EditServiceScreen extends Component { | |||
132 | label: intl.formatMessage(messages.customUrl), | 132 | label: intl.formatMessage(messages.customUrl), |
133 | placeholder: 'https://', | 133 | placeholder: 'https://', |
134 | value: service.customUrl, | 134 | value: service.customUrl, |
135 | validate: [required, url], | 135 | validators: [required, url], |
136 | }, | 136 | }, |
137 | }); | 137 | }); |
138 | } | 138 | } |
139 | 139 | ||
140 | // More fine grained and use case specific validation rules | 140 | // More fine grained and use case specific validation rules |
141 | if (recipe.hasTeamId && recipe.hasCustomUrl) { | 141 | if (recipe.hasTeamId && recipe.hasCustomUrl) { |
142 | config.fields.team.validate = [oneRequired(['team', 'customUrl'])]; | 142 | config.fields.team.validators = [oneRequired(['team', 'customUrl'])]; |
143 | config.fields.customUrl.validate = [url, oneRequired(['team', 'customUrl'])]; | 143 | config.fields.customUrl.validators = [url, oneRequired(['team', 'customUrl'])]; |
144 | } | 144 | } |
145 | 145 | ||
146 | // If a service can be hosted and has a teamId or customUrl | 146 | // If a service can be hosted and has a teamId or customUrl |
147 | if (recipe.hasHostedOption && (recipe.hasTeamId || recipe.hasCustomUrl)) { | 147 | if (recipe.hasHostedOption && (recipe.hasTeamId || recipe.hasCustomUrl)) { |
148 | if (config.fields.team) { | 148 | if (config.fields.team) { |
149 | config.fields.team.validate = []; | 149 | config.fields.team.validators = []; |
150 | } | 150 | } |
151 | if (config.fields.customUrl) { | 151 | if (config.fields.customUrl) { |
152 | config.fields.customUrl.validate = [url]; | 152 | config.fields.customUrl.validators = [url]; |
153 | } | 153 | } |
154 | } | 154 | } |
155 | 155 | ||