<div dir="ltr"><div><div><div><div>Rachel,<br><br></div>It's an undocumented feature in config/config.rb. You'll need to add the following line, swapping our values for yours and expanding as needed:<br><br><span class="gmail-pl-c1">AppConfig</span>[<span class="gmail-pl-c1">:container_management_barcode_length</span>] <span class="gmail-pl-k">=</span> <span class="gmail-pl-k"></span> {<span class="gmail-pl-s"><span class="gmail-pl-pds">"</span>MSS<span class="gmail-pl-pds">"</span></span> => {<span class="gmail-pl-c1">:min</span> => <span class="gmail-pl-s"><span class="gmail-pl-pds">'</span>14<span class="gmail-pl-pds">'</span></span>, <span class="gmail-pl-c1">:max</span> => <span class="gmail-pl-s"><span class="gmail-pl-pds">'</span>14<span class="gmail-pl-pds">'</span></span>}, "THE" => {<span class="gmail-pl-c1">:min</span> => <span class="gmail-pl-s"><span class="gmail-pl-pds">'</span>14<span class="gmail-pl-pds">'</span></span>, <span class="gmail-pl-c1">:max</span> => <span class="gmail-pl-s"><span class="gmail-pl-pds">'</span>14<span class="gmail-pl-pds">'</span></span>}}<br><br></div><div>Note that this uses the repository code to match the validation to its repository. If a container has no barcode, it automatically validates - for our case, barcodes must be exactly either 0 or 14 characters long.<br></div><div><br></div>(Code here - <a href="https://github.com/archivesspace/archivesspace/blob/master/common/barcode_check.rb">https://github.com/archivesspace/archivesspace/blob/master/common/barcode_check.rb</a>)<br><br></div>Hope this helps,<br></div>--Alex<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Mar 16, 2018 at 11:31 AM, Rachel Aileen Searcy <span dir="ltr"><<a href="mailto:rachel.searcy@nyu.edu" target="_blank">rachel.searcy@nyu.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hello everyone,<div><br></div><div>We're interested in configuring the barcode field of the top container record to enforce validation for the number of digits. It looks like this was included in the original development of the <a href="https://guides.library.yale.edu/archivesspace/ASpaceContainerManagement" target="_blank">container management functionality</a>, but after poking around a bit in the system and available documentation I don't see any further information. If anyone has done this locally, could you be so kind as to tell me how you made this happen?</div><div><br></div><div>Thanks very much (and in the spirit of the season, go raibh maith agat 🍀),<br clear="all"><div><br></div><div class="m_-7750432667517585803gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div>Rachel Searcy<br>Accessioning Archivist, Archival Collections Management<br><div><span style="font-size:12.8000001907349px">New York University Libraries</span><br></div><div><a value="+12129982631">212.998.2539</a> | <a href="mailto:rachel.searcy@nyu.edu" target="_blank">rachel.searcy@nyu.edu</a> <br></div></div></div></div></div></div>
</div></div>
<br>______________________________<wbr>_________________<br>
Archivesspace_Users_Group mailing list<br>
<a href="mailto:Archivesspace_Users_Group@lyralists.lyrasis.org">Archivesspace_Users_Group@<wbr>lyralists.lyrasis.org</a><br>
<a href="http://lyralists.lyrasis.org/mailman/listinfo/archivesspace_users_group" rel="noreferrer" target="_blank">http://lyralists.lyrasis.org/<wbr>mailman/listinfo/<wbr>archivesspace_users_group</a><br>
<br></blockquote></div><br><br clear="all"><br>-- <br><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr">Alexander Duryee<div>Metadata Archivist</div><div>New York Public Library</div><div>(917)-229-9590</div><div><a href="mailto:alexanderduryee@nypl.org" target="_blank">alexanderduryee@nypl.org</a></div></div></div></div></div>
</div>