Back to index

plone3  3.1.7
validateId.py
Go to the documentation of this file.
00001 ##parameters=id='', **kw
00002 ##
00003 from Products.CMFDefault.utils import Message as _
00004 
00005 if id:
00006     if context.checkIdAvailable(id):
00007         return context.setStatus(True)
00008     else:
00009         return context.setStatus(False, _(u'Please choose another ID.'))
00010 else:
00011     return context.setStatus(False, _(u'Please enter an ID.'))