Hot-keys on this page
r m x p toggle line displays
j k next/prev highlighted chunk
0 (zero) top of page
1 (one) first highlighted chunk
# Authors: Rob Crittenden <rcritten@redhat.com> # # Copyright (C) 2007 Red Hat # see file 'COPYING' for use and warranty information # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. #
"""Do some basic validation of an e-mail address. Return True if ok Return False if not
If notEmpty is True the this will return an error if the field is "" or None. """
else:
return False
"""Do some basic validation of a plain text field Return True if ok Return False if not
If notEmpty is True the this will return an error if the field is "" or None. """ else:
else:
"""A string type. This is much looser in what it allows than plain"""
else:
"""Do some basic validation of a path Return True if ok Return False if not
If notEmpty is True the this will return an error if the field is "" or None. """
return False else:
"""From shadow-utils:
User/group names must match gnu e-regex: [a-zA-Z0-9_.][a-zA-Z0-9_.-]{0,30}[a-zA-Z0-9_.$-]?
as a non-POSIX, extension, allow "$" as the last char for sake of Samba 3.x "add machine script"
Return True if ok Return False if not """
return False
if notEmpty is True: return False else: return True
|