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.
This commit is contained in:
J. Ryan Stinnett 2019-03-12 16:53:30 +00:00
parent 69a066657b
commit e90d659e19

View file

@ -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({
@ -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")}