-
Notifications
You must be signed in to change notification settings - Fork 56
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Campo validação com as classes do material
- Loading branch information
1 parent
8124a23
commit 7c00d98
Showing
11 changed files
with
130,077 additions
and
29 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,168 @@ | ||
/* cyrillic-ext */ | ||
@font-face { | ||
font-family: 'Open Sans'; | ||
font-style: normal; | ||
font-weight: 700; | ||
src: local('Open Sans Bold'), local('OpenSans-Bold'), url(https://fonts.gstatic.com/s/opensans/v15/mem5YaGs126MiZpBA-UN7rgOX-hpKKSTj5PW.woff2) format('woff2'); | ||
unicode-range: U+0460-052F, U+1C80-1C88, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F; | ||
} | ||
/* cyrillic */ | ||
@font-face { | ||
font-family: 'Open Sans'; | ||
font-style: normal; | ||
font-weight: 700; | ||
src: local('Open Sans Bold'), local('OpenSans-Bold'), url(https://fonts.gstatic.com/s/opensans/v15/mem5YaGs126MiZpBA-UN7rgOVuhpKKSTj5PW.woff2) format('woff2'); | ||
unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; | ||
} | ||
/* greek-ext */ | ||
@font-face { | ||
font-family: 'Open Sans'; | ||
font-style: normal; | ||
font-weight: 700; | ||
src: local('Open Sans Bold'), local('OpenSans-Bold'), url(https://fonts.gstatic.com/s/opensans/v15/mem5YaGs126MiZpBA-UN7rgOXuhpKKSTj5PW.woff2) format('woff2'); | ||
unicode-range: U+1F00-1FFF; | ||
} | ||
/* greek */ | ||
@font-face { | ||
font-family: 'Open Sans'; | ||
font-style: normal; | ||
font-weight: 700; | ||
src: local('Open Sans Bold'), local('OpenSans-Bold'), url(https://fonts.gstatic.com/s/opensans/v15/mem5YaGs126MiZpBA-UN7rgOUehpKKSTj5PW.woff2) format('woff2'); | ||
unicode-range: U+0370-03FF; | ||
} | ||
/* vietnamese */ | ||
@font-face { | ||
font-family: 'Open Sans'; | ||
font-style: normal; | ||
font-weight: 700; | ||
src: local('Open Sans Bold'), local('OpenSans-Bold'), url(https://fonts.gstatic.com/s/opensans/v15/mem5YaGs126MiZpBA-UN7rgOXehpKKSTj5PW.woff2) format('woff2'); | ||
unicode-range: U+0102-0103, U+0110-0111, U+1EA0-1EF9, U+20AB; | ||
} | ||
/* latin-ext */ | ||
@font-face { | ||
font-family: 'Open Sans'; | ||
font-style: normal; | ||
font-weight: 700; | ||
src: local('Open Sans Bold'), local('OpenSans-Bold'), url(https://fonts.gstatic.com/s/opensans/v15/mem5YaGs126MiZpBA-UN7rgOXOhpKKSTj5PW.woff2) format('woff2'); | ||
unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF; | ||
} | ||
/* latin */ | ||
@font-face { | ||
font-family: 'Open Sans'; | ||
font-style: normal; | ||
font-weight: 700; | ||
src: local('Open Sans Bold'), local('OpenSans-Bold'), url(https://fonts.gstatic.com/s/opensans/v15/mem5YaGs126MiZpBA-UN7rgOUuhpKKSTjw.woff2) format('woff2'); | ||
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; | ||
} | ||
/* cyrillic-ext */ | ||
@font-face { | ||
font-family: 'Roboto'; | ||
font-style: normal; | ||
font-weight: 400; | ||
src: local('Roboto'), local('Roboto-Regular'), url(https://fonts.gstatic.com/s/roboto/v18/KFOmCnqEu92Fr1Mu72xKKTU1Kvnz.woff2) format('woff2'); | ||
unicode-range: U+0460-052F, U+1C80-1C88, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F; | ||
} | ||
/* cyrillic */ | ||
@font-face { | ||
font-family: 'Roboto'; | ||
font-style: normal; | ||
font-weight: 400; | ||
src: local('Roboto'), local('Roboto-Regular'), url(https://fonts.gstatic.com/s/roboto/v18/KFOmCnqEu92Fr1Mu5mxKKTU1Kvnz.woff2) format('woff2'); | ||
unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; | ||
} | ||
/* greek-ext */ | ||
@font-face { | ||
font-family: 'Roboto'; | ||
font-style: normal; | ||
font-weight: 400; | ||
src: local('Roboto'), local('Roboto-Regular'), url(https://fonts.gstatic.com/s/roboto/v18/KFOmCnqEu92Fr1Mu7mxKKTU1Kvnz.woff2) format('woff2'); | ||
unicode-range: U+1F00-1FFF; | ||
} | ||
/* greek */ | ||
@font-face { | ||
font-family: 'Roboto'; | ||
font-style: normal; | ||
font-weight: 400; | ||
src: local('Roboto'), local('Roboto-Regular'), url(https://fonts.gstatic.com/s/roboto/v18/KFOmCnqEu92Fr1Mu4WxKKTU1Kvnz.woff2) format('woff2'); | ||
unicode-range: U+0370-03FF; | ||
} | ||
/* vietnamese */ | ||
@font-face { | ||
font-family: 'Roboto'; | ||
font-style: normal; | ||
font-weight: 400; | ||
src: local('Roboto'), local('Roboto-Regular'), url(https://fonts.gstatic.com/s/roboto/v18/KFOmCnqEu92Fr1Mu7WxKKTU1Kvnz.woff2) format('woff2'); | ||
unicode-range: U+0102-0103, U+0110-0111, U+1EA0-1EF9, U+20AB; | ||
} | ||
/* latin-ext */ | ||
@font-face { | ||
font-family: 'Roboto'; | ||
font-style: normal; | ||
font-weight: 400; | ||
src: local('Roboto'), local('Roboto-Regular'), url(https://fonts.gstatic.com/s/roboto/v18/KFOmCnqEu92Fr1Mu7GxKKTU1Kvnz.woff2) format('woff2'); | ||
unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF; | ||
} | ||
/* latin */ | ||
@font-face { | ||
font-family: 'Roboto'; | ||
font-style: normal; | ||
font-weight: 400; | ||
src: local('Roboto'), local('Roboto-Regular'), url(https://fonts.gstatic.com/s/roboto/v18/KFOmCnqEu92Fr1Mu4mxKKTU1Kg.woff2) format('woff2'); | ||
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; | ||
} | ||
/* cyrillic-ext */ | ||
@font-face { | ||
font-family: 'Roboto'; | ||
font-style: normal; | ||
font-weight: 700; | ||
src: local('Roboto Bold'), local('Roboto-Bold'), url(https://fonts.gstatic.com/s/roboto/v18/KFOlCnqEu92Fr1MmWUlfCRc4AMP6lbBP.woff2) format('woff2'); | ||
unicode-range: U+0460-052F, U+1C80-1C88, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F; | ||
} | ||
/* cyrillic */ | ||
@font-face { | ||
font-family: 'Roboto'; | ||
font-style: normal; | ||
font-weight: 700; | ||
src: local('Roboto Bold'), local('Roboto-Bold'), url(https://fonts.gstatic.com/s/roboto/v18/KFOlCnqEu92Fr1MmWUlfABc4AMP6lbBP.woff2) format('woff2'); | ||
unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; | ||
} | ||
/* greek-ext */ | ||
@font-face { | ||
font-family: 'Roboto'; | ||
font-style: normal; | ||
font-weight: 700; | ||
src: local('Roboto Bold'), local('Roboto-Bold'), url(https://fonts.gstatic.com/s/roboto/v18/KFOlCnqEu92Fr1MmWUlfCBc4AMP6lbBP.woff2) format('woff2'); | ||
unicode-range: U+1F00-1FFF; | ||
} | ||
/* greek */ | ||
@font-face { | ||
font-family: 'Roboto'; | ||
font-style: normal; | ||
font-weight: 700; | ||
src: local('Roboto Bold'), local('Roboto-Bold'), url(https://fonts.gstatic.com/s/roboto/v18/KFOlCnqEu92Fr1MmWUlfBxc4AMP6lbBP.woff2) format('woff2'); | ||
unicode-range: U+0370-03FF; | ||
} | ||
/* vietnamese */ | ||
@font-face { | ||
font-family: 'Roboto'; | ||
font-style: normal; | ||
font-weight: 700; | ||
src: local('Roboto Bold'), local('Roboto-Bold'), url(https://fonts.gstatic.com/s/roboto/v18/KFOlCnqEu92Fr1MmWUlfCxc4AMP6lbBP.woff2) format('woff2'); | ||
unicode-range: U+0102-0103, U+0110-0111, U+1EA0-1EF9, U+20AB; | ||
} | ||
/* latin-ext */ | ||
@font-face { | ||
font-family: 'Roboto'; | ||
font-style: normal; | ||
font-weight: 700; | ||
src: local('Roboto Bold'), local('Roboto-Bold'), url(https://fonts.gstatic.com/s/roboto/v18/KFOlCnqEu92Fr1MmWUlfChc4AMP6lbBP.woff2) format('woff2'); | ||
unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF; | ||
} | ||
/* latin */ | ||
@font-face { | ||
font-family: 'Roboto'; | ||
font-style: normal; | ||
font-weight: 700; | ||
src: local('Roboto Bold'), local('Roboto-Bold'), url(https://fonts.gstatic.com/s/roboto/v18/KFOlCnqEu92Fr1MmWUlfBBc4AMP6lQ.woff2) format('woff2'); | ||
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
|
||
const campoObrigatorio = (value) => (value ? undefined : 'Campo Obrigatório') | ||
export const campoObrigatorio = (value) => (value ? undefined : 'Campo Obrigatório') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
import React from 'react'; | ||
import { Field, reduxForm } from 'redux-form'; | ||
import { campoObrigatorio } from './../../components/comum/validacoes'; | ||
import CampoTexto from './../../components/comum/campoTexto'; | ||
import * as ConstantesCSS from '../../components/denuncias/ConstantesCss'; | ||
import { adicionaFormAoRedux } from './../../components/comum/formControle'; | ||
|
||
const renderField = ({ input, label, type, meta: { touched, error, warning } }) => ( | ||
<div> | ||
<label>{label}</label> | ||
<div> | ||
<input {...input} placeholder={label} type={type}/> | ||
{touched && ((error && <span>{error}</span>) || (warning && <span>{warning}</span>))} | ||
</div> | ||
</div> | ||
) | ||
|
||
const FormCode = (props) => { | ||
const { handleSubmit } = props; | ||
return ( | ||
<form onSubmit={handleSubmit}> | ||
<div className="row"> | ||
<CampoTexto | ||
id={'detalhamento'} | ||
label={'* Detalhamento'} | ||
maxLen={255} | ||
type={'text'} | ||
inputClasse={ConstantesCSS.CLASSES_TEXTAREA} | ||
divClasse={`${ConstantesCSS.CLASSES_DIV_INPUT} col s12`} | ||
state={'detalhamento'} | ||
validacoes={[campoObrigatorio]} | ||
/> | ||
</div> | ||
<br/> | ||
<br/> | ||
<button type="submit">Submit</button> | ||
</form> | ||
) | ||
} | ||
|
||
|
||
export default adicionaFormAoRedux( | ||
FormCode, 'contact'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.