#NEWLINE# def validation_yesno( value , obj = None ) : #NEWLINE# #INDENT# '\n    Validates that yes or no is entered.\n    Converts the yes or no to capitalized version\n    ' #NEWLINE# if ( string . upper ( obj ) in [ 'YES' , 'NO' ] ) : #NEWLINE# #INDENT# return ( True , string . capitalize ( value ) ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# return ( False , value )