Skip to content

Add title max length warning#70

Merged
tarekio merged 11 commits intomainfrom
BYNT-1300-Missing-Warning-for-Exceeding-Text-Field-Limit-in-Original-Title-Title-Field
Jun 18, 2025
Merged

Add title max length warning#70
tarekio merged 11 commits intomainfrom
BYNT-1300-Missing-Warning-for-Exceeding-Text-Field-Limit-in-Original-Title-Title-Field

Conversation

@apodacaduron
Copy link
Contributor

Jira Issue

  1. 1300

Description

Add max length to some fields like Title based on some of the backend models.
Centralize common validations in config.js and refactor existing validation rules

Checklist

  • Tests added/updated
  • Documentation updated (if needed)
  • New strings prepared for translations

API Changes (if applicable)

  • Permissions checked
  • Endpoint tests added

Additional Notes

[Any other relevant information]

@apodacaduron apodacaduron requested a review from tarekio January 20, 2025 19:31
@apodacaduron apodacaduron self-assigned this Jan 20, 2025
@tarekio tarekio requested a review from level09 January 24, 2025 21:56
tarekio and others added 4 commits May 31, 2025 15:34
…300-Missing-Warning-for-Exceeding-Text-Field-Limit-in-Original-Title-Title-Field
Copy link
Collaborator

@level09 level09 left a comment

Choose a reason for hiding this comment

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

This is nice. but there I think there is a little discrepancy in the validation logic,

Previously:
In the create bulletin dialog, if you filled only the translation in the "Original Title" field and moved to the next field, the original field would immediately be marked as invalid (red), providing instant feedback that at least one of the fields needs to be filled.

With the new validation logic:
If you fill only the translation and move to the next field, the original field is not marked as invalid (no red border or error) until you actually try to submit the form, still it won't mark the required field as red but only shows a snackbar.
This delays feedback to the user and could lead to confusion,

To improve clarity, maintainability, and ux, I recommend introducing a dedicated validation rule, such as “at least one is required”—for bilingual fields. This would make the intent explicit in the code and ensure users receive immediate, consistent feedback as soon as they leave the field.

…300-Missing-Warning-for-Exceeding-Text-Field-Limit-in-Original-Title-Title-Field
@apodacaduron
Copy link
Contributor Author

@level09 Great find, thanks for the suggestion! I added the new rule atLeastOneRequired and explicitly pass a value to ensure that at least one of the fields is always required.

@tarekio tarekio requested a review from level09 June 18, 2025 14:37
Copy link
Collaborator

@level09 level09 left a comment

Choose a reason for hiding this comment

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

👍

@tarekio tarekio merged commit 891b050 into main Jun 18, 2025
6 of 7 checks passed
@tarekio tarekio deleted the BYNT-1300-Missing-Warning-for-Exceeding-Text-Field-Limit-in-Original-Title-Title-Field branch June 18, 2025 16:55
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.

3 participants