Skip to content

Conversation

@loneil
Copy link
Collaborator

@loneil loneil commented Feb 12, 2026

Issue #: /bcgov/entity#32075

Description of changes:
There isn't any validation API side on director field format (other than schema) so blank fields and invalid lengths and whitespacing is passing. Add name validation for director officer in the CoD validator.

Note: this will validate required director name for all cases, even if it's an addressChanged action, which matches the FE behavior where it sends the director name anyways.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of the lear license (Apache 2.0).

Signed-off-by: Lucas <lucasoneil@gmail.com>
@loneil loneil force-pushed the 32075changeDirectorNameValidation branch from 2353680 to 4a7f6a3 Compare February 12, 2026 19:27

return msg

def validate_directors_name(cod: dict) -> list:
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

There is a validate_party_name function in common validations, but this one has differences than a party name (though posted as basically the same format from the UI) in that there's the prev* fields, the role isn't variable, and there's the actions to take into account.

Could maybe generalize a "validate person name" that is shared but there's also the 20 character limit on the name fields, so probably consider any refactoring in context with https://app.zenhub.com/workspaces/entities-team-65af15f59e89f5043c2911f7/issues/gh/bcgov/entity/31979 if that gets addressed at some point.

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.

1 participant