mirror of
https://github.com/naturalcrit/homebrewery.git
synced 2026-01-09 09:22:38 +00:00
prevent crash on input to second field. small css change
This commit is contained in:
@@ -65,7 +65,7 @@ const MetadataEditor = createClass({
|
|||||||
[name] : validationErr.length > 0 ? validationErr : undefined
|
[name] : validationErr.length > 0 ? validationErr : undefined
|
||||||
}
|
}
|
||||||
}), ()=>{
|
}), ()=>{
|
||||||
if(Object.values(this.state.errs ?? {}).filter(Boolean).length === 0){
|
if(Object.values(this.state.errs ?? {}).filter(Boolean).length === 0 || !this.state.errs[name]){
|
||||||
e.target.setCustomValidity('');
|
e.target.setCustomValidity('');
|
||||||
this.props.onChange({
|
this.props.onChange({
|
||||||
...this.props.metadata,
|
...this.props.metadata,
|
||||||
|
|||||||
@@ -46,6 +46,9 @@
|
|||||||
background : #ffb9b9;
|
background : #ffb9b9;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
input[type='text'], textarea {
|
||||||
|
border : 1px solid gray;
|
||||||
|
}
|
||||||
&.thumbnail{
|
&.thumbnail{
|
||||||
height : 1.4em;
|
height : 1.4em;
|
||||||
label{
|
label{
|
||||||
|
|||||||
@@ -1,12 +1,12 @@
|
|||||||
module.exports = {
|
module.exports = {
|
||||||
title : [
|
title : [
|
||||||
(value)=>{
|
(value)=>{
|
||||||
return value?.length > 10 ? 'Max URL length of 10 characters' : null;
|
return value?.length > 10 ? 'Max title length of 10 characters' : null;
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
description : [
|
description : [
|
||||||
(value)=>{
|
(value)=>{
|
||||||
return value?.length > 10 ? 'Max URL length of 10 characters' : null;
|
return value?.length > 10 ? 'Max description length of 10 characters' : null;
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
thumbnail : [
|
thumbnail : [
|
||||||
|
|||||||
Reference in New Issue
Block a user