You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
I'm always frustrated when I need to perform common number validations such as checking if a number is prime, even, odd, a multiple of another number, a perfect square, or a perfect cube. These validations are not directly available as built-in Python functions.
Describe the solution you'd like
I would like to add the following new validators to the NumberValidator class:
isPrime: Check if a number is a prime number.
isEven: Check if a number is even.
isOdd: Check if a number is odd.
isMultipleOf: Check if a number is a multiple of another number.
isSquare: Check if a number is a perfect square.
isCube: Check if a number is a perfect cube.
These methods will provide useful validation functionality that is not directly available as default Python features.
Describe alternatives you've considered
I have considered using external libraries or writing these validations as standalone functions. However, integrating them into the NumberValidator class will provide a more cohesive and consistent approach within the library.
I am interested in working on this feature and would like to contribute to the project. Please assign this issue to me : ).
The text was updated successfully, but these errors were encountered:
Thank you for submitting this feature request and proposing to contribute! I agree that adding these validations to the NumberValidator class would enhance the library's utility and make common numerical checks more accessible.
Is your feature request related to a problem? Please describe.
I'm always frustrated when I need to perform common number validations such as checking if a number is prime, even, odd, a multiple of another number, a perfect square, or a perfect cube. These validations are not directly available as built-in Python functions.
Describe the solution you'd like
I would like to add the following new validators to the
NumberValidator
class:isPrime
: Check if a number is a prime number.isEven
: Check if a number is even.isOdd
: Check if a number is odd.isMultipleOf
: Check if a number is a multiple of another number.isSquare
: Check if a number is a perfect square.isCube
: Check if a number is a perfect cube.These methods will provide useful validation functionality that is not directly available as default Python features.
Describe alternatives you've considered
I have considered using external libraries or writing these validations as standalone functions. However, integrating them into the
NumberValidator
class will provide a more cohesive and consistent approach within the library.The text was updated successfully, but these errors were encountered: