enforce maximum title length for topics and users
This commit is contained in:
@@ -9,6 +9,8 @@ import VisiblePassword from '../widgets/visible-password.jsx';
|
||||
import LocalStorageUtil from '../lib/local-storage.js';
|
||||
import { vcard } from '../lib/utils.js';
|
||||
|
||||
import { MAX_TITLE_LENGTH } from '../config.js';
|
||||
|
||||
export default class CreateAccountView extends React.PureComponent {
|
||||
constructor(props) {
|
||||
super(props);
|
||||
@@ -59,12 +61,11 @@ export default class CreateAccountView extends React.PureComponent {
|
||||
|
||||
handleSubmit(e) {
|
||||
e.preventDefault();
|
||||
// TODO: check email for validity
|
||||
this.setState({errorCleared: false});
|
||||
this.props.onCreateAccount(
|
||||
this.state.login.trim(),
|
||||
this.state.password.trim(),
|
||||
vcard(this.state.fn, this.state.imageDataUrl),
|
||||
vcard(this.state.fn.trim().substring(0, MAX_TITLE_LENGTH), this.state.imageDataUrl),
|
||||
{'meth': 'email', 'val': this.state.email});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user