mirror of https://github.com/vector-im/riot-web
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.pull/21833/head
parent
69a066657b
commit
e90d659e19
|
@ -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")}
|
||||
|
|
Loading…
Reference in New Issue