Created
July 1, 2014 15:52
-
-
Save GantMan/ad5a23bd5e92b79bf40f to your computer and use it in GitHub Desktop.
Validation use Example
This file contains 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
# Validation Growth Plan | |
# STEP 1: Validation Tool/Utility | |
# STEP 2: Check on Validity of RMQ selected | |
# STEP 3?: Place validation on a specific input, that will watch and validate onchange | |
# The following a is a suggested workflow for Step 2 | |
# Example project validation method | |
def valid_form? | |
rmq(:mandatory_input_fields).validation.check(presence: true) | |
rmq(@email).validation.check(email: true) | |
rmq(@password).validation.check(min_length: 4, max_length: 16) | |
rmq(@ssn).validation.check(length: 4, digits: true) | |
return rmq.validation.status | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment