form validity fix

total of 10 tags are allowed but publish button was being disabled at 9 because of wrong comparison
This commit is contained in:
noumantahir 2021-10-03 12:01:13 +05:00
parent bdbe15aef5
commit 64f364b605

View File

@ -199,7 +199,7 @@ class EditorScreen extends Component {
get(fields, 'title', '').length < 255 &&
(get(fields, 'body', '') || (bodyText && bodyText > 0)) &&
get(fields, 'tags', null) &&
get(fields, 'tags', null).length < 10 &&
get(fields, 'tags', null).length <= 10 &&
isLoggedIn;
}
this.setState({ isFormValid });