Skip to content

Standardise the validators and others simliar implementations. #169

Description

@TheSCREWEDSoftware

I only can talk for Validators for SKUs, currently any new implementation requires (manually) to add a piece of code as validador, which is a bad pratice. We should have a function or class for that purpose.

What does this mainaly fixes?

  • New implementations may (my case) forget to manually create a validator for that implementation.
    Example: SKU requires the character selection to be added to the cart, should be mandatory, currently each implementation has that validation either copy pasted or new validator to achieve the same.

  • Reduces code size and code repetition.
    Having the same code or similiar code in each implementation to do the same, could be their own function or class.

  • Allows a easier choice of validators for developers or new implementation.
    Example:

  • AccountSelector | You required to be logged in

  • CharacterSelector | You required to be logged in and too choose a character prior to add to a cart.

  • GuildSelector | You required to be logged in, choose a character and choose a guild.
    and other validators.

Having each Validator having the required Validators to it could be good or bad (for nesting).

GuildSelector requires CharacterSelector which requires AccountSelector as example

| AccountSelector
| - CharacterSelector
| - - GuildSelector

Edit: IsGiftable or smth also.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions