I wanna use a custom validator with a more relevant message, the message
with IS_NOT_IN_DB() reads* "Value already in database or empty", *how can i
change the message to what i want it to be?
Mostw
On Monday, May 20, 2019 at 9:36:32 AM UTC+2, Lovedie JC wrote:
>
> IS_NOT_IN_DB()
>
> On Mon, 2
I wanna use a custom validator with a more relevant message, the message
with IS_NOT_IN_DB() reads* "Value already in database or empty", *how can i
change the message to what i want it to be?
Mostwanted
On Monday, May 20, 2019 at 9:36:32 AM UTC+2, Lovedie JC wrote:
>
> IS_NOT_IN_DB()
>
> On M
IS_NOT_IN_DB()
On Mon, 20 May 2019, 10:07 mostwanted wrote:
> I have a custom form that allows users to save information on what they
> are selling but the problem is that at times customers save similar items
> names and during a search by buyers the buyer gets a duplicate name
> results, what
I have a custom form that allows users to save information on what they are
selling but the problem is that at times customers save similar items names
and during a search by buyers the buyer gets a duplicate name results, what
i want is to disable registering clients from saving the same item n
Could you create a ticket for this please?
https://github.com/web2py/web2py/issues
Thanks!
On Thu, Apr 4, 2019 at 10:52 PM David Manns wrote:
> The table in question has a field:
>
> Field('Paiddate', 'date', requires = [IS_EMPTY_OR(IS_DATE()),
> IS_EMPTY_OR(IS_MEMBERSHIP_YEAR_END())]),
>
>
The table in question has a field:
Field('Paiddate', 'date', requires = [IS_EMPTY_OR(IS_DATE()),
IS_EMPTY_OR(IS_MEMBERSHIP_YEAR_END())]),
The custom validator is:
class IS_MEMBERSHIP_YEAR_END(object):
def __init__(self, error_message='Not a membership year end'):
self.error_mess
: [web2py] CUSTOM VALIDATOR
Hi
i have created a custom validator in the the directory modules
customvalidators.py
class COUNT_TEXT():
def __call__(self, value):
size = 25
error = None
try:
if len(value.split()) > size:
error="too mu
Hi
i have created a custom validator in the the directory modules
*customvalidators.py*
class COUNT_TEXT():
def __call__(self, value):
size = 25
error = None
try:
if len(value.split()) > size:
error="too much words"
except:
Can we see the full traceback? Where is that error being thrown?
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
---
You received this message because you are
Il 06/09/15 22:25, kvthie0 ha scritto:
> Hello all,
>
> I'm learning the inner workings of web2py and try to make a custom
> validator called IS_TIME_IN_RANGE (based on the IS_DATE_IN_RANGE
> validator).
I suggest you to test the validator in a web2py console before using
it... in case of errors y
Hello all,
I'm learning the inner workings of web2py and try to make a custom
validator called IS_TIME_IN_RANGE (based on the IS_DATE_IN_RANGE
validator).
I saved the next code in :
*www-data/web2py/applications/my_app/modules/customvalidators.py
: *
*from gluon.validators import IS_TIME*
Hello all,
I am developing a web2py application and I am writing the logic to control
stock of certain items. To that end, I wrote a custom validator which is
working fine when creating new "sale" items. Now the problem arises when
updating these sale items, because I would need to know the act
I've found this validator IS_NOT_EMPTY_IF_OTHER :
http://www.web2pyslices.com/slice/show/1586/obligate-a-field-just-in-case-another-one-has-value
Do we have a custom validator for IS_NOT_EMPTY_IF_NOT_OTHER ?
The logic is that a Field can't be Empty if another Field is already Empty
--
Resourc
hi my secound stupid beginner question but i cant get behind it.
i have a list:ref.. to choose multiple values but i need it to be not
empty. the problem when i use the IS_NOT_EMPTY validator is that the
field is not empty but "||" for an empty list i think (thats what i
have in database in this c
I've got a controller that presents the user with a ckeditor field
that lets them use a limited set of html markup. The editor returns
an empty paragraph if they press Submit without typing anything, ie,
'' , and my app needs to reject that. So I wrote a custom
validator as follows:
_striptags
greetings all,
i've just written a custom validator which has been placed into gluon/
validators.py. the strange thing is that i'm getting an undefined
error when trying to call it from db.py. i can call any of the other
validators defined in validators.py and so i'm a little boggled as to
why thi
16 matches
Mail list logo