create Group
Creates a new group with the specified name and description.
This method allows the creation of a new group by providing a name and an optional description. The result is returned as a RainbowResult, containing either the newly created Group or an error in case of failure.
Validation Rules:
namemust be between 1 and 255 characters. If null or empty, the operation will fail.description(optional) must not exceed 255 characters.
Behavior:
If the provided
nameis invalid, the function returns a Failure with an appropriate error message.If the group is successfully created, it is added to the groups property.
Return
A RainbowResult containing the created Group on success or an error on failure.
Parameters
The name of the group. Must be between 1 and 255 characters. If null or empty, the operation fails.
An optional description for the group, up to 255 characters.