From d4a148d56c413eddb81acae8f3d12977837eb6fc Mon Sep 17 00:00:00 2001 From: "J. Ryan Stinnett" Date: Tue, 5 Mar 2019 11:18:58 +0000 Subject: [PATCH] Use `oneOf` to check the input element --- src/components/views/elements/Field.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/components/views/elements/Field.js b/src/components/views/elements/Field.js index 1367ca0d7a..1b7d9fdd73 100644 --- a/src/components/views/elements/Field.js +++ b/src/components/views/elements/Field.js @@ -22,9 +22,8 @@ export default class Field extends React.PureComponent { // The field's ID, which binds the input and label together. id: PropTypes.string.isRequired, // The element to create. Defaults to "input". - // Should be "input", "select", or "textarea". // To define options for a select, use - element: PropTypes.string, + element: PropTypes.oneOf(["input", "select", "textarea"]), // The field's type (when used as an ). Defaults to "text". type: PropTypes.string, // The field's label string.