1
0
mirror of https://github.com/matrix-org/matrix-react-sdk.git synced 2025-11-20 16:22:28 +03:00

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