feat(core): implements fields max length service - #333
Merged
Conversation
8 tasks
zikani03
requested changes
Jul 11, 2026
Blue-B-code
force-pushed
the
feature-36919
branch
2 times, most recently
from
July 14, 2026 15:19
4ac47ef to
4bfde67
Compare
Blue-B-code
force-pushed
the
feature-36919
branch
from
July 14, 2026 15:27
4bfde67 to
05b7235
Compare
|
zikani03
approved these changes
Jul 15, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



#Thank you for your contribution to openIMIS!
#Please complete the sections below. Anything in comments is guidance and can be deleted.
Description
In Openimis, several backend models enforce maximum field lengths (
max_length). Consequently, when the frontend sends a payload with fields exceeding these limits, the backend returns an error message for the mutation. To prevent users from encountering this—given that the backend error message is not particularly user-friendly—we implemented a service that blocks further input once themax_lengthis reached and displays a message to inform the user (see screenshot).The implemented approach is as follows:
On the backend, a new type is added to the queries:
MaxLengthConstraintsGQLTypeExpected payload:
query GetMaxLengthConstraints { maxLengthConstraints { constraints } }which returns something like:
{ "data": { "maxLengthConstraints": { "insuree": { "uuid": 36, "chfId": 50, "lastName": 100, "otherNames": 100, "marital": 1, "passport": 25, "phone": 50, "email": 100, "currentAddress": 200, "geolocation": 250, "status": 2 } } } }On the frontend, this payload is retrieved, and component properties are used to identify the
max_lengthfor the current field and manage user interaction.Type of Change
Related Issue(s) / Task(s)
Demo
Upload screenshots/gifs or link to any demo video here.
Checklist