mirror of
https://github.com/element-hq/element-web
synced 2024-11-27 03:36:07 +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:
parent
69a066657b
commit
e90d659e19
1 changed files with 0 additions and 10 deletions
|
@ -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 a new issue