-
Notifications
You must be signed in to change notification settings - Fork 125
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Create format validation for phone nos. #1442
base: main
Are you sure you want to change the base?
Conversation
Some comments on this small PR.
|
@pri-kise, I processed the first 3 remarks. Implemented the facade pattern. Please have a first look. Some questions:
|
src/System Application/App/Format Validation/src/FormatValidationImpl.Codeunit.al
Outdated
Show resolved
Hide resolved
src/System Application/App/Format Validation/src/FormatValidationImpl.Codeunit.al
Outdated
Show resolved
Hide resolved
Regaring your questions:
It would be the easiest if you you create an issue on this repository. @JesperSchulz can then approve it.
For the appId. -> Simple take a new Guid
lgtm
I think this would be the correct approach. |
src/System Application/Test/Format Validation/src/FormatValidationTests.Codeunit.al
Outdated
Show resolved
Hide resolved
In general this PR is now in a good shape for review by someone of Microsoft. 👍 |
@pri-kise @StefanSosic What are the next steps? I want to keep this PR rolling. I still need object nos before I can build and publish the changes. I currently cannot test the changes in this PR. And if this one is approved I still have the PR in the BusinessCentralApps repo pending, to call these new validations from Contact Alt. Address. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's address the ID question first. Generally the design guidelines are now followed and this is a proper module, but I'm not sure I'm a fan of the two public procedures. I will set aside time on Monday to take a closer look.
src/System Application/App/Format Validation/src/FormatValidation.Codeunit.al
Outdated
Show resolved
Hide resolved
src/System Application/App/Format Validation/src/FormatValidationImpl.Codeunit.al
Outdated
Show resolved
Hide resolved
src/System Application/Test Library/FormatValidation/src/FormatValidationTestTable.table.al
Outdated
Show resolved
Hide resolved
|
||
namespace System.Test.Utilities; | ||
|
||
codeunit 139194 "Format Validation Tests" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please use ID 130449.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This object number is also assigned to the test table.
Caption = 'Format Validation Test Table'; | ||
DataClassification = SystemMetadata; | ||
|
||
fields |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it really necessary to introduce this table just to test the validation of a phone no? I'd argue it's not.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is not necessary. In the unit test codeunit it is also possible to assign a value without using a table. Please discuss it internally because this was the suggestion from your colleagues.
I've created an issue for you and have linked everything up alright. After code review on Monday we'll settle on a final design and then we'll get this one in before the week is over. I hope that works for you! |
Summary
Provides methods to validate that entered data is in the correct format, such as phone numbers.
Work Item(s)
Fixes #1493