Add support for Required and Optional fields in OptionObject and RowO…#296
Merged
scottolsonjr merged 4 commits intomainfrom Mar 9, 2026
Merged
Conversation
…bject - Extended OptionObject, OptionObject2, and OptionObject2015 to handle Required and Optional fields. - Implemented SetRequiredField and SetOptionalField methods in FormObjectHelpers, OptionObjectHelpers, and RowObjectHelpers. - Added unit tests for Required and Optional field functionalities in OptionObject, OptionObject2, OptionObject2015, and RowObject. - Updated existing tests to include scenarios for Required and Optional fields.
…Object and RowObject
Contributor
There was a problem hiding this comment.
Pull request overview
This PR extends the *.Helpers extension method surface area to support marking FieldObject.Required as required/optional across RowObject, FormObject, and the various OptionObject* containers, with corresponding MSTest coverage updates.
Changes:
- Added
SetRequiredField(s)/SetOptionalField(s)helpers toRowObjectHelpers,FormObjectHelpers, andOptionObject*Helpers. - Updated helper test suites to include required/optional scenarios alongside existing enabled/locked/unlocked behaviors.
- Added/expanded unit tests for required/optional behavior on
RowObject,FormObject, andOptionObject*.
Reviewed changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated 11 comments.
Show a summary per file
| File | Description |
|---|---|
| dotnet/RarelySimple.AvatarScriptLink.Objects.Helpers/RowObjectHelpers.cs | Adds required/optional field mutation helpers on RowObject with RowAction updates. |
| dotnet/RarelySimple.AvatarScriptLink.Objects.Helpers/FormObjectHelpers.cs | Adds required/optional helpers on FormObject including multi-iteration behavior across rows. |
| dotnet/RarelySimple.AvatarScriptLink.Objects.Helpers/OptionObjectHelpers.cs | Adds required/optional helpers on OptionObject that delegate into FormObject helpers. |
| dotnet/RarelySimple.AvatarScriptLink.Objects.Helpers/OptionObject2Helpers.cs | Adds required/optional helpers on OptionObject2. |
| dotnet/RarelySimple.AvatarScriptLink.Objects.Helpers/OptionObject2015Helpers.cs | Adds required/optional helpers on OptionObject2015. |
| dotnet/RarelySimple.AvatarScriptLink.Objects.Helpers.Tests/RowObjectHelpersTests.cs | Extends row helper tests for required/optional and adds new required/optional test cases. |
| dotnet/RarelySimple.AvatarScriptLink.Objects.Helpers.Tests/FormObjectHelpersTests.cs | Adds multi-iteration tests for required/optional operations. |
| dotnet/RarelySimple.AvatarScriptLink.Objects.Helpers.Tests/OptionObjectHelpers.OptionObject.Tests.cs | Adds required/optional cases and coverage for OptionObject. |
| dotnet/RarelySimple.AvatarScriptLink.Objects.Helpers.Tests/OptionObjectHelpers.OptionObject2.Tests.cs | Adds required/optional cases and coverage for OptionObject2. |
| dotnet/RarelySimple.AvatarScriptLink.Objects.Helpers.Tests/OptionObjectHelpers.OptionObject2015.Tests.cs | Adds required/optional cases and coverage for OptionObject2015. |
dotnet/RarelySimple.AvatarScriptLink.Objects.Helpers/FormObjectHelpers.cs
Outdated
Show resolved
Hide resolved
dotnet/RarelySimple.AvatarScriptLink.Objects.Helpers/OptionObject2Helpers.cs
Show resolved
Hide resolved
dotnet/RarelySimple.AvatarScriptLink.Objects.Helpers/OptionObject2Helpers.cs
Show resolved
Hide resolved
dotnet/RarelySimple.AvatarScriptLink.Objects.Helpers/OptionObject2015Helpers.cs
Show resolved
Hide resolved
dotnet/RarelySimple.AvatarScriptLink.Objects.Helpers/FormObjectHelpers.cs
Show resolved
Hide resolved
dotnet/RarelySimple.AvatarScriptLink.Objects.Helpers/RowObjectHelpers.cs
Show resolved
Hide resolved
dotnet/RarelySimple.AvatarScriptLink.Objects.Helpers/OptionObjectHelpers.cs
Show resolved
Hide resolved
dotnet/RarelySimple.AvatarScriptLink.Objects.Helpers/OptionObjectHelpers.cs
Show resolved
Hide resolved
dotnet/RarelySimple.AvatarScriptLink.Objects.Helpers/FormObjectHelpers.cs
Show resolved
Hide resolved
dotnet/RarelySimple.AvatarScriptLink.Objects.Helpers/FormObjectHelpers.cs
Show resolved
Hide resolved
… for FormObject and OptionObject
|
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.



Add support for Required and Optional fields in OptionObject and RowObject