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
// post-form.html
type HtmlFormErrors struct {
type Inputs struct {
Title string
Text string
Files string
@ -51,7 +51,8 @@ type HtmlFormData struct {
FirstPostID int
CaptchaID string
IsCaptchaActive bool
Errors HtmlFormErrors
Errors Inputs
Inputs
}
// index.html

View File

@ -101,8 +101,8 @@ func ValidatePost(title, text string, files []*multipart.FileHeader) string {
return ""
}
func ValidatePost2(title, text string, files []*multipart.FileHeader) *repositories.HtmlFormErrors {
validationError := new(repositories.HtmlFormErrors)
func ValidatePost2(title, text string, files []*multipart.FileHeader) *repositories.Inputs {
validationError := new(repositories.Inputs)
hasErrors := false
if text == "" && len(files) == 0 {