[MODCFIELDS-42] Custom Field: Field Format Validation Created: 07/Aug/19  Updated: 25/Jun/20  Resolved: 25/Jun/20

Status: Closed
Project: mod-customfields
Components: None
Affects versions: None
Fix versions: 1.4.1

Type: Story Priority: P3
Reporter: Khalilah Gambrell Assignee: Pavlo Smahin
Resolution: Done Votes: 0
Labels: back-end, epam-spitfire
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original estimate: Not Specified

Issue links:
Requires
is required by UXPROD-2289 Q3 2020 | Custom Fields (for User Rec... Closed
Sprint: eHoldings Sprint 91
Story Points: 5
Development Team: Spitfire

 Description   

As a librarian
I want custom fields to support field validation and format
So that the values entered display properly

Requirements

  • If custom field input type = text field then allow a user to specify field validation and display format
  • Field name: Field Format
  • Input type: Single select dropdown (can only select one value)
  • Field Format Options: Text, Email address, URL, Number
  • Field Format Option Default: Text
  • Text selection is the default and does not change the current behavior of the text field
  • Email Address selection allows the value to display as an email address. The email address must contain one @ symbol followed by at least one character AND then followed by a period to be valid
  • URL selection allows the value to display as an URL. The URL value must contain http:// or https:// at the beginning to be valid
  • Number selection allows the value to display as a Number. The Number value must contain numbers, commas, white spaces, decimals to be valid
  • May need to review for more rules

Acceptance criteria

Given user creates a custom field input type = Text field
When Field Format: Text is selected
Then characters entered and saved on the Create/Edit/View record display as text on the record and are no different from current text field UI record display

Given user creates a custom field input type = Text field
When Field Format: Number is selected
AND 1234 or 23,000 is entered
Then Create/Edit/View record displays as number on the record

Given user creates a custom field input type = Text field
When Field Format: Number is selected
AND non-numeric characters are entered (2354#4$)
With the exception of white space , decimal, comma
Then Create/Edit record should display an inline error message [Field can only accept numeric, white space, decimal, and commas characters. Please revise.]
AND not allow the value to be saved.

Given user creates a custom field input type = Text field
When Field Format: URL is selected
AND http:// or https:// are the first characters entered
Then Create/Edit/View record displays as URL on the record

Given user creates a custom field input type = Text field
When Field Format: URL is selected
AND http:// or https:// are NOT the first characters entered
Then Create/Edit record should display an inline error message [URL is not formatted properly. Please revise.]
AND not allow the value to be saved.

Given user creates a custom field input type = Text field
When Field Format: Email address is selected
AND contains one @ symbol followed by at least one character AND then followed by a period t(e.g. kgambrell@ebsco.com)
Then Create/Edit/View record displays that value as an email address

Given user creates a custom field input type = Text field
When Field Format: Email address is selected
BUT does not contain one @ symbol followed by at least one character AND then followed by a period (e.g. kgambrellebscocom)
Then Create/Edit record should display an inline error message [Email address is not formatted properly. Please revise.]
AND not allow the value to be saved.

Given user creates a custom field input type = Text field
When Field Format: Email address is selected
BUT does not contain at least one character after the @ symbol (e.g. kgambrell@)
Then Create/Edit record should display an inline error message [Email address is not formatted properly. Please revise.]
AND not allow the value to be saved.

Given user creates a custom field input type = Text field
When Field Format: Email address is selected
BUT does not contain a period after the character(s) after the @ symbol (e.g. kgambrell@ebscocom)
Then Create/Edit record should display an inline error message [Email address is not formatted properly. Please revise.]
AND not allow the value to be saved.



 Comments   
Comment by Uschi Klute [ 10/Jun/20 ]

email address: instead of the asterisk it should be the @ character being required Some characters are not allowed in an email address (e.g. brackets) and behind the @ the must be at least one character and then a period can follow.

Comment by Khalilah Gambrell [ 10/Jun/20 ]

Uschi Klute, you are right. I do not know why I wrote asterisk . Revising the story now.

Comment by Pavlo Smahin [ 23/Jun/20 ]

Number formats:

Formats:	Examples:
00000		12345
-00000		-12345
#,0000		0,1234 | ,1234 | 1,234
#.0000		0.1234 | .1234 | 1.234
-#,0000		-0,1234 | -,1234 | -1,234
-#.0000		-0.1234 | -.1234 | -1.234
0 000 000	1 234 567 | 1 234
0,000,000	1,234,567 | 1,234
0,000.000	1,234.567 | 1,234,567.89
Comment by Pavlo Smahin [ 24/Jun/20 ]

Khalilah Gambrell
Should we have ability to update field format after field was created. If yes, what we have to do with already assigned values to records?

Comment by Khalilah Gambrell [ 24/Jun/20 ]

Good point, Pavlo Smahin. Cannot change it once field has been created.

Generated at Thu Feb 08 22:33:13 UTC 2024 using Jira 1001.0.0-SNAPSHOT#100246-sha1:7a5c50119eb0633d306e14180817ddef5e80c75d.