mirror of
https://github.com/yanislav-igonin/micrach
synced 2024-12-23 06:42:33 +03:00
rename to inputs
This commit is contained in:
parent
fb9933097b
commit
122637f5f3
@ -40,7 +40,7 @@ type File struct {
|
|||||||
// HTML Templates Structs
|
// HTML Templates Structs
|
||||||
|
|
||||||
// post-form.html
|
// post-form.html
|
||||||
type HtmlFormErrors struct {
|
type Inputs struct {
|
||||||
Title string
|
Title string
|
||||||
Text string
|
Text string
|
||||||
Files string
|
Files string
|
||||||
@ -51,7 +51,8 @@ type HtmlFormData struct {
|
|||||||
FirstPostID int
|
FirstPostID int
|
||||||
CaptchaID string
|
CaptchaID string
|
||||||
IsCaptchaActive bool
|
IsCaptchaActive bool
|
||||||
Errors HtmlFormErrors
|
Errors Inputs
|
||||||
|
Inputs
|
||||||
}
|
}
|
||||||
|
|
||||||
// index.html
|
// index.html
|
||||||
|
@ -101,8 +101,8 @@ func ValidatePost(title, text string, files []*multipart.FileHeader) string {
|
|||||||
return ""
|
return ""
|
||||||
}
|
}
|
||||||
|
|
||||||
func ValidatePost2(title, text string, files []*multipart.FileHeader) *repositories.HtmlFormErrors {
|
func ValidatePost2(title, text string, files []*multipart.FileHeader) *repositories.Inputs {
|
||||||
validationError := new(repositories.HtmlFormErrors)
|
validationError := new(repositories.Inputs)
|
||||||
hasErrors := false
|
hasErrors := false
|
||||||
|
|
||||||
if text == "" && len(files) == 0 {
|
if text == "" && len(files) == 0 {
|
||||||
|
Loading…
Reference in New Issue
Block a user