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

Client side validation? #10

Open
MattyBalaam opened this issue Oct 5, 2012 · 1 comment
Open

Client side validation? #10

MattyBalaam opened this issue Oct 5, 2012 · 1 comment

Comments

@MattyBalaam
Copy link

I was wondering how to enable client side validation. I thought I had managed it by adding

'''
->setAttribute('required','true')
'''

to the Field. But this appears to be a new HTML5 validation method and doesn't play with the bootstrap validation styling. Is there a recommended way, or do I need to investigate using something like: https://github.com/redmantech/bootstrap-validate

@unclecheese
Copy link
Owner

Yeah, validation is a little tricky. I usually use exactly what you have there -- setting the "required" attribute, and for backward compatibility, I use RequiredFields(), which offers server-side validation.

aaron_carlino {
web_developer
www.leftandmain.com
}

On Friday, October 5, 2012 at 5:41 AM, MattyBalaam wrote:

Apologies if I missed this in the screencast, but is the best way to enble client-side validation to add
'''
->setAttribute('required','true')
'''
to the Field?


Reply to this email directly or view it on GitHub (#10).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants