rename to inputs

This commit is contained in:
Yanislav Igonin 2022-04-12 11:41:12 +03:00
parent fb9933097b
commit 122637f5f3
2 changed files with 5 additions and 4 deletions

View File

@ -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

View File

@ -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 {