Skip to content
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

Add passmark range validation #3342

Merged
merged 2 commits into from Jul 2, 2020
Merged

Add passmark range validation #3342

merged 2 commits into from Jul 2, 2020

Conversation

renatho
Copy link
Contributor

@renatho renatho commented Jul 1, 2020

Changes proposed in this Pull Request

  • Add passmark range validations, accepting only numbers between 0 and 100.

Testing instructions

  • It doesn't appear on the screen yet, so I recommend test running the test or debugging the code.

@renatho renatho added this to the 3.3.0 milestone Jul 1, 2020
@renatho renatho requested a review from a team July 1, 2020 18:40
@renatho renatho self-assigned this Jul 1, 2020
*
* @return boolean Is valid.
*/
public function validate_passmark( $field, Sensei_Import_Lesson_Model $model ) {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we have many validations, we could create a validation lib and it could become a range validator in this lib.

Copy link
Member

@jom jom left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good and works well 👍

@renatho renatho merged commit 92b57be into master Jul 2, 2020
@renatho renatho deleted the add/passmark-validation branch July 2, 2020 17:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants