[Archivesspace_Users_Group] Configuring barcode digits?

Majewski, Steven Dennis (sdm7g) sdm7g at virginia.edu
Fri Mar 16 12:37:42 EDT 2018

The generate_accession_identifiers plugin is an example of how to load javascript conditionally for a particular controller and action. For your case, you probably want to catch the top_containers controller for new and edit actions.


<% if controller.controller_name == 'accessions' && controller.action_name == 'new' %>
  <%= javascript_include_tag "#{@base_url}/assets/generate_accession_identifiers.js" %>
<% end %>

Inspecting the form html, the field you want to validate is: $( ‘input#top_container_barcode_’ ) 

You can google many examples of how to validate forms using jquery.
Here’s one example:


— Steve M. 

> On Mar 16, 2018, at 11:31 AM, Rachel Aileen Searcy <rachel.searcy at nyu.edu> wrote:
> Hello everyone,
> 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 container management functionality <https://guides.library.yale.edu/archivesspace/ASpaceContainerManagement>, 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?
> Thanks very much (and in the spirit of the season, go raibh maith agat 🍀),
> Rachel Searcy
> Accessioning Archivist, Archival Collections Management
> New York University Libraries
> 212.998.2539 <> | rachel.searcy at nyu.edu <mailto:rachel.searcy at nyu.edu> 
> _______________________________________________
> Archivesspace_Users_Group mailing list
> Archivesspace_Users_Group at lyralists.lyrasis.org
> http://lyralists.lyrasis.org/mailman/listinfo/archivesspace_users_group

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lyralists.lyrasis.org/pipermail/archivesspace_users_group/attachments/20180316/6bceea64/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 6091 bytes
Desc: not available
URL: <http://lyralists.lyrasis.org/pipermail/archivesspace_users_group/attachments/20180316/6bceea64/attachment.bin>

More information about the Archivesspace_Users_Group mailing list