View previous topic :: View next topic |
Author |
Message |
KlausWikrist Smarty n00b
Joined: 27 Apr 2016 Posts: 1
|
|
Back to top |
|
AnrDaemon Administrator
Joined: 03 Dec 2012 Posts: 1785
|
Posted: Wed Apr 27, 2016 1:21 pm Post subject: |
|
|
I don't quite understand your issue.
And next time please show text data as text. There's [code] tag for exactly that use. |
|
Back to top |
|
elpmis Smarty Elite
Joined: 07 Jun 2007 Posts: 321
|
Posted: Wed Apr 27, 2016 10:30 pm Post subject: Re: Form validation |
|
|
KlausWikrist wrote: | How can I make the validation right in php and smarty?
|
You don't need php, and you don't need Smarty for validation of your (simple) form .
All you need is HTML5
Code: | <input type="text" name="name" pattern=".{5,10}" required title="5 to 10 characters"> |
|
|
Back to top |
|
AnrDaemon Administrator
Joined: 03 Dec 2012 Posts: 1785
|
Posted: Wed Apr 27, 2016 10:45 pm Post subject: Re: Form validation |
|
|
elpmis wrote: | Code: | <input type="text" name="name" pattern=".{5,10}" required title="5 to 10 characters"> |
|
This is not validation, this is browser suggestion. |
|
Back to top |
|
elpmis Smarty Elite
Joined: 07 Jun 2007 Posts: 321
|
Posted: Wed Apr 27, 2016 11:19 pm Post subject: |
|
|
If the pattern conditions are not met you can't send the form. It does what he wants ... |
|
Back to top |
|
AnrDaemon Administrator
Joined: 03 Dec 2012 Posts: 1785
|
Posted: Wed Apr 27, 2016 11:25 pm Post subject: |
|
|
elpmis wrote: | If the pattern conditions are not met you can't send the form. It does what he wants ... |
Most certainly I can. Browser will complain, but send the form anyway. And if I'm not using browser at all, all your form fiddling is meaningless. |
|
Back to top |
|
elpmis Smarty Elite
Joined: 07 Jun 2007 Posts: 321
|
Posted: Thu Apr 28, 2016 6:06 am Post subject: |
|
|
Before you swing great speeches here and all know better, you'd better answer the question of the thread starter.
THIS is the sense of this forum!!
And he've said he is a Smarty newbie - your arrogance is there not really helpful.
(yes, I'm following all your answers)
Quote: | I don't quite understand your issue. |
If you are unable to understand the question, you should mention better. |
|
Back to top |
|
AnrDaemon Administrator
Joined: 03 Dec 2012 Posts: 1785
|
Posted: Thu Apr 28, 2016 12:34 pm Post subject: |
|
|
elpmis wrote: | Before you swing great speeches here and all know better, you'd better answer the question of the thread starter.
THIS is the sense of this forum!! |
Wrong.
The forum is here so that YOU can find the answer, with other people's help, not being spoon-fed with it.
Spoon-feeding never increase your understanding of the problem.
And OP obviously have at least two problems, that are tangentially related to the question he asked: He don't understand, what form validation means, and he don't understand, what Smarty is, and how it works.
And until he explains that himself to me, I won't believe that he understand both cases. |
|
Back to top |
|
|