Skip to content

validation number #5356

Answered by edwardch
samaremad asked this question in Help
Jan 17, 2021 · 2 comments · 7 replies
Discussion options

You must be logged in to vote

And if you change your validation rule to check the length of the value, and not the element (like in the password length validator)?

this.form.Username.addValidationRule(this.uniqueName, x => {
// Your example is using this.form.Username.element.length
var nationalID = this.form.Username.value.length;

            if (nationalID !=10) {
                return "National ID is too short"
            }
        })

Replies: 2 comments 7 replies

Comment options

You must be logged in to vote
1 reply
@samaremad
Comment options

Comment options

You must be logged in to vote
6 replies
@edwardch
Comment options

@samaremad
Comment options

@edwardch
Comment options

@samaremad
Comment options

@edwardch
Comment options

Answer selected by samaremad
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
None yet
2 participants