From e90d659e195e1dfdf94c1840572bff634d224825 Mon Sep 17 00:00:00 2001 From: "J. Ryan Stinnett" Date: Tue, 12 Mar 2019 16:53:30 +0000 Subject: [PATCH] Remove validation demo code This is example code from @ara4n's work in https://github.com/matrix-org/matrix-react-sdk/pull/2550. We're not ready to actually apply validation yet, so removing this for now. --- src/components/views/auth/ServerConfig.js | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/src/components/views/auth/ServerConfig.js b/src/components/views/auth/ServerConfig.js index ed6b4bdf7d..cb0e0dc38e 100644 --- a/src/components/views/auth/ServerConfig.js +++ b/src/components/views/auth/ServerConfig.js @@ -90,15 +90,6 @@ export default class ServerConfig extends React.PureComponent { this.setState({ hsUrl }); } - onHomeserverValidate = (value) => { - try { - new URL(value); - return { valid: true, feedback:
Valid URL!
}; - } catch (_) { - return { valid: false, feedback:
Invalid URL!
}; - } - } - onIdentityServerBlur = (ev) => { this._isTimeoutId = this._waitThenInvoke(this._isTimeoutId, () => { this.props.onServerConfigChange({ @@ -143,7 +134,6 @@ export default class ServerConfig extends React.PureComponent { value={this.state.hsUrl} onBlur={this.onHomeserverBlur} onChange={this.onHomeserverChange} - onValidate={this.onHomeserverValidate} />