Fix textfield tag error
Description
This PR solves the issue with textfield_tags where error "String' has no instance named 'isValidTag" was thrown after a tag was entered in the textfield.
Changes:- Defines an inline function validateTag() within the scope of the validator. Encapsulates the validation logic within this function. Provides better encapsulation and organization of validation logic, enhancing readability and maintainability. Fixes #307
Type of change
Please delete options that are not relevant.
- [x] Bug fix (non-breaking change which fixes an issue)
How Has This Been Tested?
Test manually on physical device.
Before:
After
Checklist:
- [x] My code follows the style guidelines of this project
- [x] I have performed a self-review of my own code
- [x] I have commented my code, particularly in hard-to-understand areas
- [ ] I have made corresponding changes to the documentation
- [x] My changes generate no new warnings
- [ ] I have added tests that prove my fix is effective or that my feature works
- [ ] New and existing unit tests pass locally with my changes
- [ ] Any dependent changes have been merged and published in downstream modules
- [x] I have checked my code and corrected any misspellings
Maintainer Checklist
- [ ] closes #xxxx (Replace xxxx with the GitHub issue number)
- [ ] Tag the PR with the appropriate labels
I think it would be more beneficial for the overall structure and maintainability of the code if the validation logic was separated from the UI code. For instance, you could place the
validateTagfunction in theCreateRoomController
Yes you are right,i will do it. Thanks for the suggestion.
@chandansgowda please review the changes
Hey @amanraval76593 this is good to go, will merge once the PR previous to this one are merged @kareemabdeen Good work with the review thank you