Skip to content

notice(non_ascii_or_non_printable_char): use standard fieldName - #2165

Open
c-tonneslan wants to merge 2 commits into
MobilityData:masterfrom
c-tonneslan:fix/non-ascii-fieldname
Open

c-tonneslan wants to merge 2 commits into
MobilityData:masterfrom
c-tonneslan:fix/non-ascii-fieldname

Conversation

@c-tonneslan

Copy link
Copy Markdown

The serialized output of NonAsciiOrNonPrintableCharNotice carries the offending column under the key columnName, but every other notice (InvalidCurrencyNotice, InvalidPhoneNumberNotice, etc.) uses fieldName. That forces downstream pipelines to special-case this one rule.

Just renamed the field to match. Callers already pass cellContext.fieldName() into the constructor positionally, so no caller signatures change and no behavior changes — only the JSON key the field reflects to.

Closes #1205.

The serialized output of this notice carries the offending column under
the key 'columnName', but every other notice uses 'fieldName' (see
InvalidCurrencyNotice, InvalidPhoneNumberNotice, etc.). Pipelines
consuming the validator output have to special-case this one validator.

Just match the convention. Callers already pass cellContext.fieldName()
into the constructor, so no behavior changes - only the JSON key the
field reflects to.

Closes MobilityData#1205.

Signed-off-by: Charlie Tonneslan <cst0520@gmail.com>
@CLAassistant

CLAassistant commented May 17, 2026 •

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@CLAassistant

Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@emmambd
emmambd requested a review from skalexch August 24, 2026 14:07

@skalexch skalexch left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the change! It makes sense since fieldName is the standard attribute for all other notices using the header name of the column.

@emmambd this requires another review from a dev.

Also, a change needs to be done on the web page?

We need to swap columnName for FieldName and change the definition to "The name of the faulty field."

@emmambd

emmambd commented Aug 26, 2026

Copy link
Copy Markdown
Contributor

@skalexch The documentation is produced by the notice code, so the notice code is what should include the changed definition.

FieldName will automatically appear once this PR is merged and released.

@davidgamez davidgamez left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@emmambd

emmambd commented Aug 31, 2026

Copy link
Copy Markdown
Contributor

@davidgamez Woohoo! Is this a breaking change since it means downstream users need to remove the special-case for this rule?


/** Name of the column where the error occurred. */
private final String columnName;
/** Faulty record's field name. */

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[nit]: Just to be consistent with other fields' documentation:

Suggested change
/** Faulty record's field name. */
/** The name of the faulty field. */

@davidgamez

Copy link
Copy Markdown
Member

@davidgamez Woohoo! Is this a breaking change since it means downstream users need to remove the special-case for this rule?

Yes, this is a breaking change, as any consumer parsing this rule will need to consume the "new" property name.

@davidgamez
davidgamez self-requested a review August 31, 2026 21:11
@davidgamez

Copy link
Copy Markdown
Member

@c-tonneslan, please remove columnName from the expected field names in the NoticeFieldsTest test

@emmambd emmambd modified the milestone: 9.0 Validator Release Oct 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Use standard fieldName field for non_ascii_or_non_printable_char validation instead of custom columnName field

5 participants