Skip to content

Commit

Permalink
Remove validation demo code
Browse files Browse the repository at this point in the history
This is example code from @ara4n's work in
matrix-org#2550. We're not ready to
actually apply validation yet, so removing this for now.
  • Loading branch information
jryans committed Mar 12, 2019
1 parent 69a0666 commit e90d659
Showing 1 changed file with 0 additions and 10 deletions.
10 changes: 0 additions & 10 deletions src/components/views/auth/ServerConfig.js
Original file line number Diff line number Diff line change
Expand Up @@ -90,15 +90,6 @@ export default class ServerConfig extends React.PureComponent {
this.setState({ hsUrl });
}

onHomeserverValidate = (value) => {
try {
new URL(value);
return { valid: true, feedback: <div>Valid URL!</div> };
} catch (_) {
return { valid: false, feedback: <div>Invalid URL!</div>};
}
}

onIdentityServerBlur = (ev) => {
this._isTimeoutId = this._waitThenInvoke(this._isTimeoutId, () => {
this.props.onServerConfigChange({
Expand Down Expand Up @@ -143,7 +134,6 @@ export default class ServerConfig extends React.PureComponent {
value={this.state.hsUrl}
onBlur={this.onHomeserverBlur}
onChange={this.onHomeserverChange}
onValidate={this.onHomeserverValidate}
/>
<Field id="mx_ServerConfig_isUrl"
label={_t("Identity Server URL")}
Expand Down

0 comments on commit e90d659

Please sign in to comment.