Skip to content

Commit

Permalink
#3431 - Warnings appear while saving any structure as Daylight SMARTS
Browse files Browse the repository at this point in the history
- Update fields max length for isotope and charge
  • Loading branch information
AKZhuk committed Oct 12, 2023
1 parent 29f8612 commit 7601d51
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,8 @@ export const atom = {
charge: {
title: 'Charge',
type: 'string',
pattern: '^([+-]?)([0-9]{1,3}|1000)([+-]?)$',
maxLength: 5,
pattern: '^([+-]?)([0-9]{1,3})([+-]?)$',
maxLength: 4,
default: '',
invalidMessage: 'Invalid charge value',
},
Expand All @@ -72,9 +72,9 @@ export const atom = {
isotope: {
title: 'Isotope (atomic mass)',
type: 'string',
pattern: '^([0-9]{1,3}|1000)$|(^$)',
pattern: '^[0-9]{1,3}$|(^$)',
default: '',
maxLength: 5,
maxLength: 3,
invalidMessage: 'Invalid isotope value',
},
radical: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -138,8 +138,8 @@ const Atom: FC<Props> = (props: Props) => {
<div>
<AtomElement formState={formState} className=""></AtomElement>
<Field name="alias" />
<Field name="charge" maxLength="5" />
<Field name="isotope" />
<Field name="charge" maxLength={atomProps.charge.maxLength} />
<Field name="isotope" maxLength={atomProps.isotope.maxLength} />
<Field
name="explicitValence"
component={Select}
Expand Down

0 comments on commit 7601d51

Please sign in to comment.