An undertaking to keep the peace shall also be considered an undertaking to be of good behavior, and cannot be required except as prescribed in this chapter.